[FEAT] Amountless Melt Requests
Main Objective
Adds support for amountless payment requests (e.g. bolt11 amountless invoices) and signals support in the info endpoint (mint features)
https://github.com/cashubtc/nuts/pull/173
Enabled for:
- [x] CLN
- [x] LND
- [x] Fake
- [ ] Blink
- [ ] LNbits
- [ ] Strike
Also Added
PaymentQuoteKind:
-
REGULARfor regular quotes -
AMOUNTLESSfor quotes where the amount is specified in the amountless option -
PARTIALfor quotes where we pay only the partial amount specified in the mpp option
m07_add_payment_quote_kind migration adds the kind column to melt_quotes in the DB. Defaults to REGULAR for all already present records.
Codecov Report
Attention: Patch coverage is 27.17949% with 142 lines in your changes missing coverage. Please review.
Project coverage is 52.50%. Comparing base (
3e32dc4) to head (5e4aac8). Report is 3 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #712 +/- ##
==========================================
- Coverage 55.36% 52.50% -2.86%
==========================================
Files 84 84
Lines 9479 9652 +173
==========================================
- Hits 5248 5068 -180
- Misses 4231 4584 +353
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
There is a problem here: when paying, backends cannot distinguish whether the amount on the quote is a partial amount or the full amount for a amountless invoice.
It seems like the tests with fakewallet have nuts = {} empty nuts dict (?)
EDIT: problem was the deprecated API CI workflow
Getting back to this very nice PR.
I think it could benefit from a few more test cases:
- error if an amountless invoice is trying to be paid without providing an amount (should maybe be a mint test, not wallet?)
- and the opposite, error when a normal invoice is being paid but with an amount provided in the request
- tests for the wallet cli for paying amountless invoices
Getting back to this very nice PR.
I think it could benefit from a few more test cases:
* error if an amountless invoice is trying to be paid without providing an amount (should maybe be a mint test, not wallet?) * and the opposite, error when a normal invoice is being paid but with an amount provided in the request * tests for the wallet cli for paying amountless invoices
Yea actually it's testing the Mint, not the wallet. I should probably move that particular test somewhere else.
and the opposite, error when a normal invoice is being paid but with an amount provided in the request
We have MPP quotes remember? A client can specify the amount in the request even if the invoice specifies one.