Skip to content

Commit

Permalink
Merge pull request #650 from breez/fix-recoverer-actual-payer-amount
Browse files Browse the repository at this point in the history
Fix actual payer amount recovery
  • Loading branch information
danielgranhao authored Jan 9, 2025
2 parents 66810ec + 95352b9 commit 81e3d6c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/core/src/recover/recoverer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ impl Recoverer {
log::warn!("Could not apply recovered data for incoming Chain swap {swap_id}: recovery data not found");
continue;
};
chain_swap.actual_payer_amount_sat =
Some(recovered_data.btc_user_lockup_amount_sat);
if recovered_data.btc_user_lockup_amount_sat > 0 {
chain_swap.actual_payer_amount_sat =
Some(recovered_data.btc_user_lockup_amount_sat);
}
let is_expired =
bitcoin_tip.height as u32 >= chain_swap.timeout_block_height;
let min_lockup_amount_sat = chain_swap.payer_amount_sat;
Expand Down

0 comments on commit 81e3d6c

Please sign in to comment.