Skip to content

Fix undefined onchain fee in transaction RPC#198

Open
bufo24 wants to merge 1 commit intoalexbosworth:masterfrom
bufo24:chore/fix-undefined-fee
Open

Fix undefined onchain fee in transaction RPC#198
bufo24 wants to merge 1 commit intoalexbosworth:masterfrom
bufo24:chore/fix-undefined-fee

Conversation

@bufo24
Copy link
Copy Markdown
Contributor

@bufo24 bufo24 commented Apr 7, 2025

It can be that the onchain fee (total_fees) is 0. || sees that as a falsely value so Number(tx.total_fees) || undefined will result in undefined. Using ??, it will stay 0

@alexbosworth
Copy link
Copy Markdown
Owner

I think this was by design because LND was returning 0 incorrectly so if it's showing 0 from the API it doesn't really mean 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants