From 17706709d19440ab873d9615770613db0dbeffda Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sat, 14 Sep 2024 16:04:54 +0100 Subject: [PATCH] fix: input proofs less then required --- crates/cdk/src/mint/mod.rs | 2 +- crates/cdk/src/wallet/client.rs | 2 +- crates/cdk/src/wallet/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/cdk/src/mint/mod.rs b/crates/cdk/src/mint/mod.rs index e508a3aa..aad09634 100644 --- a/crates/cdk/src/mint/mod.rs +++ b/crates/cdk/src/mint/mod.rs @@ -1045,7 +1045,7 @@ impl Mint { // Check that the inputs proofs are greater then total. // Transaction does not need to be balanced as wallet may not want change. - if proofs_total <= required_total { + if proofs_total < required_total { tracing::info!( "Swap request unbalanced: {}, outputs {}, fee {}", proofs_total, diff --git a/crates/cdk/src/wallet/client.rs b/crates/cdk/src/wallet/client.rs index 7ab0350e..143af9fb 100644 --- a/crates/cdk/src/wallet/client.rs +++ b/crates/cdk/src/wallet/client.rs @@ -208,7 +208,7 @@ impl HttpClient { } /// Melt Quote [NUT-05] - #[instrument(skip(self), fields(mint_url = %mint_url))] + #[instrument(skip(self, request), fields(mint_url = %mint_url))] pub async fn post_melt_quote( &self, mint_url: Url, diff --git a/crates/cdk/src/wallet/mod.rs b/crates/cdk/src/wallet/mod.rs index cb95f1b3..6ab974b5 100644 --- a/crates/cdk/src/wallet/mod.rs +++ b/crates/cdk/src/wallet/mod.rs @@ -1308,7 +1308,7 @@ impl Wallet { /// Ok(()) /// } /// ``` - #[instrument(skip(self))] + #[instrument(skip(self, request))] pub async fn melt_quote( &self, request: String, @@ -1378,7 +1378,7 @@ impl Wallet { } /// Melt specific proofs - #[instrument(skip(self))] + #[instrument(skip(self, proofs))] pub async fn melt_proofs(&self, quote_id: &str, proofs: Proofs) -> Result { let quote_info = self.localstore.get_melt_quote(quote_id).await?; let quote_info = if let Some(quote) = quote_info {