fix(wallet): accept uppercase QR-scanned BOLT11 invoices on send #103

Merged
padreug merged 1 commit from fix/uppercase-bolt11-send into dev 2026-06-15 20:09:15 +00:00

1 commit

Author SHA1 Message Date
138f9905bf fix(wallet): accept uppercase QR-scanned BOLT11 invoices on send
The send path detected and decoded uppercase invoices correctly (SendDialog's
isBolt11 lowercases first) but WalletService.sendPayment gated the bolt11
branch on a case-sensitive startsWith('ln'), so QR-scanned invoices (uppercase
bech32, e.g. LNBC...) fell through to the else and threw "Invalid payment
destination format" despite the UI showing a valid decode.

Detect BOLT11 case-insensitively by its HRP (lnbc/lntb/lntbs/lnbcrt) and send
the lowercase canonical form. The bare 'ln' prefix also incidentally matched
bech32 LNURLs (lnurl1...) and misrouted them to the bolt11 endpoint; matching
the full HRP closes that gap too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 22:05:09 +02:00