Skip to content

Commit b3d7407

Browse files
committed
fix(ldk-node): only include fee in amount if outbound tx
1 parent c7dfae5 commit b3d7407

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

crates/cdk-ldk-node/src/web/handlers/payments.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ pub async fn payments_page(
160160

161161
@let amount_str = {
162162
match (payment.amount_msat, payment.fee_paid_msat) {
163-
(Some(amount), Some(fee)) => format_msats_as_btc(amount + fee),
164-
(Some(amount), None) => format_msats_as_btc(amount),
163+
(Some(amount), Some(fee)) if payment.direction == PaymentDirection::Outbound => format_msats_as_btc(amount + fee),
164+
(Some(amount), _) => format_msats_as_btc(amount),
165165
_ => "Unknown".to_string()
166166
}
167167
};

0 commit comments

Comments
 (0)