From 7b9b430aa1bc531d8ee64b6e383d768eff501974 Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sun, 5 Jan 2025 15:03:47 +0000 Subject: [PATCH] fix: mpp melt quote msats to pay --- crates/cdk/src/mint/melt.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/cdk/src/mint/melt.rs b/crates/cdk/src/mint/melt.rs index a3dbf0fc..cacda785 100644 --- a/crates/cdk/src/mint/melt.rs +++ b/crates/cdk/src/mint/melt.rs @@ -59,7 +59,7 @@ impl Mint { let MeltQuoteBolt11Request { request, unit, - options: _, + options, .. } = melt_request; @@ -90,11 +90,7 @@ impl Mint { // We only want to set the msats_to_pay of the melt quote if the invoice is amountless // or we want to ignore the amount and do an mpp payment - let msats_to_pay = if request.amount_milli_satoshis().is_some() { - None - } else { - Some(amount_msats) - }; + let msats_to_pay = options.map(|opt| opt.amount_msat()); let quote = MeltQuote::new( request.to_string(),