diff --git a/taptrade-cli-demo/trader/src/trading/maker_utils.rs b/taptrade-cli-demo/trader/src/trading/maker_utils.rs index bbbd71b..31a755d 100644 --- a/taptrade-cli-demo/trader/src/trading/maker_utils.rs +++ b/taptrade-cli-demo/trader/src/trading/maker_utils.rs @@ -35,12 +35,12 @@ impl ActiveOffer { // polling until offer is taken, in production a more efficient way would make sense // returns the PSBT of the escrow trade transaction we have to validate, sign and return pub fn wait_until_taken( - self, + &self, trader_config: &TraderSettings, ) -> Result { loop { thread::sleep(Duration::from_secs(10)); - if let Some(offer_taken_response) = OfferTakenResponse::check(&self, trader_config)? { + if let Some(offer_taken_response) = OfferTakenResponse::check(self, trader_config)? { let psbt_bytes = hex::decode(offer_taken_response.trade_psbt_hex_to_sign)?; let psbt = PartiallySignedTransaction::deserialize(&psbt_bytes)?; return Ok(psbt); diff --git a/taptrade-cli-demo/trader/src/trading/mod.rs b/taptrade-cli-demo/trader/src/trading/mod.rs index 81847ba..f96e6a9 100644 --- a/taptrade-cli-demo/trader/src/trading/mod.rs +++ b/taptrade-cli-demo/trader/src/trading/mod.rs @@ -7,7 +7,7 @@ use crate::{ cli::TraderSettings, communication::api::{ BondRequirementResponse, BondSubmissionRequest, OfferTakenRequest, OfferTakenResponse, - PublicOffer, PublicOffers, + PsbtSubmissionRequest, PublicOffer, PublicOffers, }, wallet::{ bond::Bond, @@ -38,7 +38,7 @@ pub fn run_maker(maker_config: &TraderSettings) -> Result<()> { PsbtSubmissionRequest::submit_escrow_psbt( &escrow_contract_psbt, offer.offer_id_hex.clone(), - taker_config, + maker_config, )?; // wait for confirmation