diff --git a/taptrade-cli-demo/coordinator/src/communication/api.rs b/taptrade-cli-demo/coordinator/src/communication/api.rs index 3929fda..5e65b80 100644 --- a/taptrade-cli-demo/coordinator/src/communication/api.rs +++ b/taptrade-cli-demo/coordinator/src/communication/api.rs @@ -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. diff --git a/taptrade-cli-demo/coordinator/src/communication/mod.rs b/taptrade-cli-demo/coordinator/src/communication/mod.rs index fb4df35..be5b600 100755 --- a/taptrade-cli-demo/coordinator/src/communication/mod.rs +++ b/taptrade-cli-demo/coordinator/src/communication/mod.rs @@ -36,7 +36,7 @@ async fn receive_order(Json(order): Json)-> Json, -) -> Response { +) -> Json { // 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]