Skip to content

fix: preserve lnurl msat precision#5

Open
piotr-iohk wants to merge 1 commit intosynonymdev:mainfrom
piotr-iohk:fix/lnurl-msat-precision
Open

fix: preserve lnurl msat precision#5
piotr-iohk wants to merge 1 commit intosynonymdev:mainfrom
piotr-iohk:fix/lnurl-msat-precision

Conversation

@piotr-iohk
Copy link
Copy Markdown

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

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.

1 participant