Skip to content

Commit

Permalink
Derive chain swap fees using claim tx amount when available
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgranhao committed Jan 2, 2025
1 parent fc151c7 commit 5b86366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ impl Payment {
.unwrap_or(utils::now()),
amount_sat: tx.amount_sat,
fees_sat: match swap.as_ref() {
Some(s) => s.payer_amount_sat - s.receiver_amount_sat,
Some(s) => s.payer_amount_sat - tx.amount_sat,
None => match tx.payment_type {
PaymentType::Receive => 0,
PaymentType::Send => tx.fees_sat,
Expand Down

0 comments on commit 5b86366

Please sign in to comment.