From 201706d5553701d856dbf80d95ef45297945e387 Mon Sep 17 00:00:00 2001 From: fbock Date: Wed, 7 Aug 2024 10:40:59 +0200 Subject: [PATCH] add debug logs --- .../coordinator/src/wallet/escrow_psbt.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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()) {