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