aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/socket.ts
Commit message (Collapse)AuthorAgeFilesLines
* invoice: a reusable bolt12 offer has no terminal paid stateAdam Soltys2026-09-221-1/+6
| | | | | | | | | | | | | | | | | | | | | A bolt12 offer is a standing payment code. CLN derives the same offer_id from the same (amount, description), so re-creating one hands back the original record, whose `received` has accumulated over the offer's whole lifetime. The invoice layout read that as "this invoice was paid" and redirected to the success screen, so reopening a long-lived offer never showed the QR and left no way to copy the lno. Treat a payment as celebratory only when it arrives while the page is open: the socket handler now passes the amount of that payment as `?paid=<amount>`, and the layout uses it in place of the lifetime total for reusable offers. Single-use invoices keep the existing logic, so a partly-paid invoice still stays on the QR rather than celebrating early. The success screen showed lifetime `received` for the same reason, which misreported a single payment to a long-lived offer; it now renders the amount the socket reported, which is already net of tip. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* prevent redirect while navigatingAdam Soltys2025-09-091-2/+1
|
* load more contactsAdam Soltys2024-11-291-2/+2
|
* bip21 and socket fixesAdam Soltys2024-11-261-4/+20
|
* payment amount helpersAdam Soltys2024-11-141-5/+12
|
* get push subscriptionAdam Soltys2024-10-221-9/+9
|
* biome formatAdam Soltys2024-10-181-49/+52
|
* socket improvementsAdam Soltys2024-10-111-6/+12
|
* typescriptAdam Soltys2024-08-301-2/+1
|
* typescriptAdam Soltys2024-08-301-0/+92