mirror of
https://github.com/aljazceru/cdk.git
synced 2026-02-05 05:06:14 +01:00
fix: input proofs less then required
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user