aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dedup-invoices.ts
Commit message (Collapse)AuthorAgeFilesLines
* invoices: don't re-list an invoice id on update (dedupe :invoices)stagingAdam Soltys2026-06-181-0/+86
Port of the master fix (2d2f9856) + cleanup script to staging. generate() unconditionally lPush'd the invoice id to `${aid}:invoices`, but it's also called from update() (tip/webhook changes, repeated bolt12 offer creation) re-using the existing id — so each update re-appended the same id and the user's :invoices accumulated duplicate entries, rendering the same offer/invoice multiple times. Guard the push with LPOS so it only adds the id the first time. Also add scripts/dedup-invoices.ts to scrub already-accumulated dupes (dry-run by default, --apply to write, idempotent). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>