Skip to content

Commit

Permalink
Fix actual payer amount recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgranhao committed Jan 9, 2025
1 parent 66810ec commit 95352b9
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 95352b9

Please sign in to comment.