Skip to content

Commit

Permalink
fix: mpp melt quote msats to pay (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid authored Jan 5, 2025
2 parents 6a8a5a7 + 7b9b430 commit eb8719d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/cdk/src/mint/melt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Mint {
let MeltQuoteBolt11Request {
request,
unit,
options: _,
options,
..
} = melt_request;

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit eb8719d

Please sign in to comment.