From dce1a05332627724ee94e645aa13c06dec98faf0 Mon Sep 17 00:00:00 2001 From: fbock Date: Thu, 22 Aug 2024 10:55:11 +0200 Subject: [PATCH] remove unclear comments --- taptrade-cli-demo/coordinator/src/communication/api.rs | 3 --- .../coordinator/src/coordinator/coordinator_utils.rs | 1 + taptrade-cli-demo/coordinator/src/coordinator/mod.rs | 2 +- taptrade-cli-demo/trader/src/trading/mod.rs | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/taptrade-cli-demo/coordinator/src/communication/api.rs b/taptrade-cli-demo/coordinator/src/communication/api.rs index b7884dc..113d2b6 100644 --- a/taptrade-cli-demo/coordinator/src/communication/api.rs +++ b/taptrade-cli-demo/coordinator/src/communication/api.rs @@ -1,6 +1,5 @@ use super::*; -// Receiving this struct as input to the server #[derive(Deserialize, Serialize, Debug, Validate)] pub struct OfferRequest { pub robohash_hex: String, // identifier of the trader @@ -13,7 +12,6 @@ pub struct OfferRequest { pub offer_duration_ts: u64, // unix timestamp how long the offer should stay available } -// Define a struct representing your response data #[derive(Serialize, PartialEq, Debug, Validate)] pub struct BondRequirementResponse { pub bond_address: String, @@ -21,7 +19,6 @@ pub struct BondRequirementResponse { } // maker step 2 -// (submission of signed bond and other data neccessary to coordinate the trade) #[derive(Deserialize, Serialize, Debug)] pub struct BondSubmissionRequest { pub robohash_hex: String, diff --git a/taptrade-cli-demo/coordinator/src/coordinator/coordinator_utils.rs b/taptrade-cli-demo/coordinator/src/coordinator/coordinator_utils.rs index b4d4546..ff41135 100644 --- a/taptrade-cli-demo/coordinator/src/coordinator/coordinator_utils.rs +++ b/taptrade-cli-demo/coordinator/src/coordinator/coordinator_utils.rs @@ -53,6 +53,7 @@ pub fn agg_hex_musig_nonces(maker_nonce: &str, taker_nonce: &str) -> Result Result<()> { // submit signed payout psbt back to coordinator PayoutSignatureRequest::send(&maker_config, &signature, &offer.offer_id_hex)?; } else { - error!("Trade failed. Initiating escrow mode."); + warn!("Trader unsatisfied. Initiating escrow mode."); TradeObligationsUnsatisfied::request_escrow(&offer.offer_id_hex, maker_config)?; let escrow_payout_script_psbt = IsOfferReadyRequest::poll_payout(maker_config, &offer)?; } @@ -110,7 +110,7 @@ pub fn run_taker(taker_config: &TraderSettings) -> Result<()> { PayoutSignatureRequest::send(&taker_config, &signature, &accepted_offer.offer_id_hex)?; // here we need to handle if the other party is not cooperating } else { - error!("Trade failed."); + error!("Trader unsatisfied. Initiating escrow mode."); panic!("Escrow to be implemented!"); } Ok(())