diff options
| author | Adam Soltys <[email protected]> | 2026-06-18 11:15:27 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-18 11:15:27 -0700 |
| commit | d2762384156e3310ca08d7c295dea0e3856f8c9d (patch) | |
| tree | a25c56a6af40fff8374768a70a9fe0ba983a3619 /scripts | |
| parent | 3a60e3a49a031c8efea067b3c142b086bb6f5847 (diff) | |
| download | coinos-server-d2762384156e3310ca08d7c295dea0e3856f8c9d.tar.gz coinos-server-d2762384156e3310ca08d7c295dea0e3856f8c9d.zip | |
payments: normalize bolt11 to lowercase so failed uppercase sends get reconciled
BOLT11 is case-insensitive, but an uppercase-pasted invoice was stored as
the payment hash and the pending-set entry verbatim. check()'s
startsWith("ln") test is case-sensitive, so it treated such pending
entries as non-lightning and evicted them without reversing — a failed
send would never be auto-refunded.
- sendLightning: lowercase the invoice up front so the stored hash, the
pending entry, and xpay all use the same form.
- check(): lowercase before the startsWith("ln") test (defensive; also
rescues any already-stored uppercase entries).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
