Skip to content

fix: preserve lnurl msat precision#5

Merged
ovitrif merged 1 commit intosynonymdev:mainfrom
piotr-iohk:fix/lnurl-msat-precision
Apr 5, 2026
Merged

fix: preserve lnurl msat precision#5
ovitrif merged 1 commit intosynonymdev:mainfrom
piotr-iohk:fix/lnurl-msat-precision

Conversation

@piotr-iohk
Copy link
Copy Markdown
Contributor

@piotr-iohk piotr-iohk commented Apr 3, 2026

Summary

  • preserve LNURL-pay invoice precision by creating LND invoices with value_msat instead of truncating callback amounts to sats
  • preserve LNURL-withdraw range validation precision by validating callback invoices against num_msat (with sat fallback)
  • add changelog entries under Unreleased documenting LNURL pay/withdraw msat precision fixes

Test plan

  • Start LNURL server and generate fixed LNURL-pay with sub-sat amount (e.g. 222222/222538 msat)
  • Decode created invoice and verify num_msat preserves exact callback amount
  • Generate fixed LNURL-withdraw with sub-sat range and verify callback validation accepts in-range num_msat
  • Verify out-of-range LNURL-withdraw callbacks are rejected with msat range message

Made with Cursor

Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tAck

tested LNURL-PAY & LNURL-WITHDRAW using:

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