Skip to content

Commit dce1a05

Browse files
author
fbock
committed
remove unclear comments
1 parent 6d84f45 commit dce1a05

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

taptrade-cli-demo/coordinator/src/communication/api.rs

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use super::*;
22

3-
// Receiving this struct as input to the server
43
#[derive(Deserialize, Serialize, Debug, Validate)]
54
pub struct OfferRequest {
65
pub robohash_hex: String, // identifier of the trader
@@ -13,15 +12,13 @@ pub struct OfferRequest {
1312
pub offer_duration_ts: u64, // unix timestamp how long the offer should stay available
1413
}
1514

16-
// Define a struct representing your response data
1715
#[derive(Serialize, PartialEq, Debug, Validate)]
1816
pub struct BondRequirementResponse {
1917
pub bond_address: String,
2018
pub locking_amount_sat: u64, // min amount of the bond output in sat
2119
}
2220

2321
// maker step 2
24-
// (submission of signed bond and other data neccessary to coordinate the trade)
2522
#[derive(Deserialize, Serialize, Debug)]
2623
pub struct BondSubmissionRequest {
2724
pub robohash_hex: String,

taptrade-cli-demo/coordinator/src/coordinator/coordinator_utils.rs

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ pub fn agg_hex_musig_nonces(maker_nonce: &str, taker_nonce: &str) -> Result<Musi
5353
}
5454

5555
impl KeyspendContext {
56+
#[allow(clippy::too_many_arguments)]
5657
pub fn from_hex_str(
5758
maker_sig: &str,
5859
taker_sig: &str,

taptrade-cli-demo/coordinator/src/coordinator/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ pub async fn handle_payout_signature(
385385
.map_err(|e| {
386386
RequestError::Database(format!(
387387
"Failed to delete complete offer from taken_offers: {}",
388-
e.to_string()
388+
e
389389
))
390390
})?;
391391
Ok(true)

taptrade-cli-demo/trader/src/trading/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub fn run_maker(maker_config: &TraderSettings) -> Result<()> {
6666
// submit signed payout psbt back to coordinator
6767
PayoutSignatureRequest::send(&maker_config, &signature, &offer.offer_id_hex)?;
6868
} else {
69-
error!("Trade failed. Initiating escrow mode.");
69+
warn!("Trader unsatisfied. Initiating escrow mode.");
7070
TradeObligationsUnsatisfied::request_escrow(&offer.offer_id_hex, maker_config)?;
7171
let escrow_payout_script_psbt = IsOfferReadyRequest::poll_payout(maker_config, &offer)?;
7272
}
@@ -110,7 +110,7 @@ pub fn run_taker(taker_config: &TraderSettings) -> Result<()> {
110110
PayoutSignatureRequest::send(&taker_config, &signature, &accepted_offer.offer_id_hex)?;
111111
// here we need to handle if the other party is not cooperating
112112
} else {
113-
error!("Trade failed.");
113+
error!("Trader unsatisfied. Initiating escrow mode.");
114114
panic!("Escrow to be implemented!");
115115
}
116116
Ok(())

0 commit comments

Comments
 (0)