mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-07-21 18:23:43 +00:00
corrected the input error
This commit is contained in:
@ -21,7 +21,7 @@ pub struct BondRequirementResponse {
|
||||
|
||||
// maker step 2
|
||||
// (submission of signed bond and other data neccessary to coordinate the trade)
|
||||
#[derive(Serialize, Debug)]
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct BondSubmissionRequest {
|
||||
pub robohash_hex: String,
|
||||
pub signed_bond_hex: String, // signed bond transaction, hex encoded
|
||||
@ -31,7 +31,7 @@ pub struct BondSubmissionRequest {
|
||||
}
|
||||
|
||||
// Response after step2 if offer creation was successful and the offer is now online in the orderbook
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Serialize)]
|
||||
pub struct OrderActivatedResponse {
|
||||
pub order_id_hex: String,
|
||||
pub bond_locked_until_timestamp: u128, // unix timestamp. Do not touch bond till then unless offer gets taken.
|
||||
|
@ -36,7 +36,7 @@ async fn receive_order(Json(order): Json<OrderRequest>)-> Json<BondRequirementRe
|
||||
|
||||
async fn submit_maker_bond(
|
||||
Json(payload): Json<BondSubmissionRequest>,
|
||||
) -> Response {
|
||||
) -> Json<OrderActivatedResponse> {
|
||||
// Process the payload
|
||||
// For now, we'll just return a dummy success response
|
||||
let response = OrderActivatedResponse {
|
||||
@ -45,10 +45,7 @@ async fn submit_maker_bond(
|
||||
};
|
||||
|
||||
// Create the JSON response
|
||||
let json = Json(response);
|
||||
|
||||
// Create the full response with status code
|
||||
(StatusCode::OK, json).into_response()
|
||||
Json(response)
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
Reference in New Issue
Block a user