fix: avoid msat truncation when paying invoices with built-in amounts#879
fix: avoid msat truncation when paying invoices with built-in amounts#879ben-kaufman wants to merge 4 commits intomasterfrom
Conversation
Bump bitkit-core to v0.1.56 which rounds up sub-satoshi invoice amounts. Additionally, stop overriding the amount for invoices that already have one. Pass null so LDK uses the invoice's native msat precision instead of our truncated sats value converted back to msat. Only pass the amount for zero-amount invoices where the user specifies it. Closes #877
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
|
Observations from testing: 1) The fix rounds up to full sats precision for the payment and display amount, so ln invoice with from synonymdev/bitkit-e2e-tests#141. Screen.Recording.2026-04-02.at.12.58.54.mov2) There is an issue with lnurl-pay and and lnurl-withdrawal. For testing on local regtest, more utility commands for
Screen.Recording.2026-04-02.at.13.53.59.mov
Screen.Recording.2026-04-02.at.14.26.12.mov |
Code review1 issue found. Missing
|
Summary
nullso LDK uses the invoice's native msat precision instead of our truncated sats value converted back to msatTest plan
lnd.addInvoice({ valueMsat })using amounts222538,222222,500500msatDepends on synonymdev/bitkit-core#85
Closes #877
🤖 Generated with Claude Code