Skip to content

Conversation

@jvsena42
Copy link
Member

This PR fixes unified invoice validation to accept Lightning payment when on-chain balance is zero.

Description

When typing or pasting a unified invoice (BIP21 with embedded Lightning), the validation incorrectly rejected it if on-chain balance was zero, even when the user had sufficient Lightning balance. The fix adds unified invoice detection to validateOnChainAddress(), mirroring the existing logic in onScanOnchain().

Preview

VIDEO_1

QA Notes

1. Unified invoice with Lightning balance only

  1. Create wallet with 0 on-chain balance but funded Lightning channel
  2. Paste a unified invoice (BIP21 with ?lightning= param)
  3. Verify: Address should be accepted (green checkmark)
  4. Before fix: Shows "Insufficient Savings" error

2. Regression - Pure on-chain address

  1. Paste a plain Bitcoin address
  2. Verify on-chain balance validation still works as expected

3. Regression - Scan flow

  1. Scan a unified QR code
  2. Verify it still routes correctly to Lightning payment

@jvsena42 jvsena42 self-assigned this Jan 19, 2026
@jvsena42 jvsena42 marked this pull request as draft January 19, 2026 18:02
@jvsena42 jvsena42 closed this Jan 19, 2026
@jvsena42 jvsena42 deleted the fix/zero-amount-uniffied-invoice-validation branch January 19, 2026 18:15
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