Skip to content

Commit

Permalink
fix: estimate_ln_fee should be in sats
Browse files Browse the repository at this point in the history
estimate_ln_fee should always return amount in sats not msats.
This is not what happens when we get the amount from the Bolt11 invoice.
  • Loading branch information
storopoli authored Jul 9, 2024
1 parent 97fcfee commit f37a25c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mutiny-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,9 @@ impl<S: MutinyStorage> MutinyWallet<S> {
log_trace!(self.logger, "calling estimate_ln_fee");

let amt = amt_sats
.or(inv.and_then(|i| i.amount_milli_satoshis()))
.or(inv
.and_then(|i| i.amount_milli_satoshis())
.map(|a| a / 1_000))
.ok_or(MutinyError::BadAmountError)?;

// check balances first
Expand Down

0 comments on commit f37a25c

Please sign in to comment.