From f37a25cfc0a172b7bba9e56cfdad852e7f8b114c Mon Sep 17 00:00:00 2001 From: Jose Storopoli Date: Tue, 9 Jul 2024 09:48:11 -0300 Subject: [PATCH] fix: estimate_ln_fee should be in sats 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. --- mutiny-core/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mutiny-core/src/lib.rs b/mutiny-core/src/lib.rs index 6deae167e..9c9bcf943 100644 --- a/mutiny-core/src/lib.rs +++ b/mutiny-core/src/lib.rs @@ -1639,7 +1639,9 @@ impl MutinyWallet { 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