Jelajahi Sumber

fix: input proofs less then required

thesimplekid 5 bulan lalu
induk
melakukan
17706709d1

+ 1 - 1
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,

+ 1 - 1
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,

+ 2 - 2
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<Melted, Error> {
         let quote_info = self.localstore.get_melt_quote(quote_id).await?;
         let quote_info = if let Some(quote) = quote_info {