Skip to content

Commit

Permalink
sync: fix trampoline fee
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Oct 11, 2024
1 parent 2d01527 commit 3c28f5f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libs/sdk-core/src/greenlight/node_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2107,10 +2107,7 @@ impl TryFrom<SendPayAgg> for Payment {
.then_some((label.amount_msat, label.client_label))
})
.unwrap_or((value.amount.unwrap_or_default(), value.label));
let fee_msat = match value.amount {
Some(amount) => value.amount_sent.saturating_sub(amount),
None => 0,
};
let fee_msat = value.amount_sent.saturating_sub(payment_amount);
let status = if value.state & PAYMENT_STATE_COMPLETE > 0 {
PaymentStatus::Complete
} else if value.state & PAYMENT_STATE_PENDING > 0 {
Expand Down

0 comments on commit 3c28f5f

Please sign in to comment.