fix(swap): tx_lock_spending_fee was estimated to be zero if utxos less than dust limit (#363)

* fix(swap): tx_lock_spending_fee was estimated to be zero if we had less funds than dust limit

* fix
This commit is contained in:
Mohan 2025-05-28 17:43:27 +02:00 committed by GitHub
parent 091ba57547
commit 274c630aba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 180 additions and 108 deletions

View file

@ -1238,7 +1238,7 @@ where
loop {
let min_outstanding = bid_quote.min_quantity - max_giveable;
let min_bitcoin_lock_tx_fee = spending_fee; // Use the fee from max_giveable
let min_bitcoin_lock_tx_fee = spending_fee;
let min_deposit_until_swap_will_start = min_outstanding + min_bitcoin_lock_tx_fee;
let max_deposit_until_maximum_amount_is_reached = maximum_amount
.checked_sub(max_giveable)