-
-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cln: allow amountless invoices in node tx list #2138
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #2138 +/- ##
==========================================
+ Coverage 54.45% 60.35% +5.89%
==========================================
Files 56 56
Lines 8454 8454
==========================================
+ Hits 4604 5102 +498
+ Misses 3850 3352 -498 ☔ View full report in Codecov by Sentry. |
1861ec2
to
f566d2f
Compare
Noting that this worked fine for LND, because they list |
Yes, I think the fix belongs to the node implementation, not to the base model. |
There are a few cases that I can think of:
So in the case of keysend I think it's ok to use amount_received_msat, as PR #2056 does. In case of a paid amountless invoice I think it's ok to display |
f566d2f
to
1386c72
Compare
@prusnak fixed. |
1386c72
to
fa02436
Compare
I fixed the black/ruff formatter warnings and force pushed to the PR branch to fix the CI failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Bolt11 allows for invoices to have no amount, allowing the sender to select the amount to send. At least core lightning and LND support this.
When looking through my invoices on the node page, I get an error when it tries to fetch an unpaid invoice with no amount:
This PR fixes that issue by making
NodeInvoice.amount
optional. This causes the invoice to show amount 0 in the UI. I think this is acceptable. Ideally it should say "any" or something similar.