fix: input proofs less then required

This commit is contained in:
thesimplekid
2024-09-14 16:04:54 +01:00
parent 84bc9efbf2
commit 17706709d1
3 changed files with 4 additions and 4 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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 {