diff --git a/taptrade-cli-demo/coordinator/src/wallet/escrow_psbt.rs b/taptrade-cli-demo/coordinator/src/wallet/escrow_psbt.rs index 9b1e7e5..dc82dba 100644 --- a/taptrade-cli-demo/coordinator/src/wallet/escrow_psbt.rs +++ b/taptrade-cli-demo/coordinator/src/wallet/escrow_psbt.rs @@ -1,4 +1,5 @@ use super::*; +use axum::routing::trace; use bdk::{ bitcoin::psbt::PartiallySignedTransaction, descriptor::Descriptor, @@ -233,10 +234,19 @@ impl CoordinatorWallet { signed_maker_psbt_hex: &str, signed_taker_psbt_hex: &str, ) -> Result<()> { - let mut maker_psbt = PartiallySignedTransaction::from_str(signed_maker_psbt_hex)?; - let taker_psbt = PartiallySignedTransaction::from_str(signed_taker_psbt_hex)?; + trace!( + "\n\n\nCombining and broadcasting escrow psbt. + signed maker psbt hex: {}, signed taker psbt hex: {}", + signed_maker_psbt_hex, + signed_taker_psbt_hex + ); + let mut maker_psbt = + PartiallySignedTransaction::deserialize(&hex::decode(signed_maker_psbt_hex)?)?; + let taker_psbt = + PartiallySignedTransaction::deserialize(&hex::decode(signed_taker_psbt_hex)?)?; maker_psbt.combine(taker_psbt)?; + debug!("Combined escrow psbt: {:#?}", maker_psbt); let wallet = self.wallet.lock().await; match wallet.finalize_psbt(&mut maker_psbt, SignOptions::default()) {