## What happened? When invoice amounts include millisatoshis that are not a whole satoshi, payment handling is incorrect. Observed from repro and user reports: - Regular BOLT11 invoices with `valueMsat` fail in app flows that should pay exact invoice amount. - LNURL-pay / LNURL-withdraw flows are also affected for msat-precision limits. - On Android specifically (LNURL case), the amount resolves to `0` for affected msat-precision flows. This aligns with the original Slack report where invoice amount precision caused payment mismatch/failure. ## Expected behavior - Regular BOLT11 invoice payments with msat precision should succeed. - LNURL-pay and LNURL-withdraw with msat-precision limits should preserve valid amount and execute. - Android should not collapse msat-precision LNURL amount to `0`. ## Steps to Reproduce 1. Use regtest/local setup with active channel and spending balance. 2. Reproduce regular invoice case via E2E `@send_3` flow (invoices created with `lnd.addInvoice({ valueMsat })`). 3. Try msat values like `222538`, `222222`, `500500`. 4. Reproduce LNURL-pay/LNURL-withdraw msat cases (fixed `min == max` msat values). 5. Observe failure behavior (Android LNURL case shows amount as `0`; regular invoice flow also fails for msat invoice handling). ## Logs / Screenshots / Recordings https://github.com/user-attachments/assets/ae0389d3-0310-4756-9813-1506c9bc4343 [logs.zip](https://github.com/user-attachments/files/26374363/logs.zip) - Original report reference: [Slack report](https://synonymworkspace.slack.com/archives/C07BJ7DNPCG/p1774940864268189) ## Bitkit Version 2.1.2 ## Device / OS Android Emulator (sdk_gphone64_arm64), Android 13 ## Reproducibility Always ## Additional context - E2E coverage for this bug class is in [bitkit-e2e-tests PR #140](https://github.com/synonymdev/bitkit-e2e-tests/pull/140) and should pass after fix. - Coverage includes: - regular invoice msat cases in `send.e2e.ts` (`@send_3`) - LNURL pay/withdraw msat cases in `lnurl.e2e.ts` - It would be good to add unit-level tests in amount parsing/payment amount calculation paths to prevent regressions. ## Similar issues check Potentially related Android issues reviewed: - [#790](https://github.com/synonymdev/bitkit-android/issues/790) (open) - `Fail to send max / near max lightning payment` - [#764](https://github.com/synonymdev/bitkit-android/issues/764) (closed) - `LNURL-pay fails with decoding error in Bitkit` - [#417](https://github.com/synonymdev/bitkit-android/issues/417) (open) - `LNURL-pay comment not displayed on activity` - [#418](https://github.com/synonymdev/bitkit-android/issues/418) (closed) - `LNURL-withdraw ... minWithdrawable == maxWithdrawable ...`
Activity
fix: round up sub-satoshi invoice amounts to prevent underpayment
fix: avoid msat truncation when paying invoices with built-in amounts
piotr-iohk commentedon Apr 2, 2026
Closed by GH automation by fault. Android PR in review.