diff options
| author | Adam Soltys <[email protected]> | 2026-06-18 07:43:48 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-18 07:43:48 -0700 |
| commit | 64691693e7ff40aae59b05a234f88025757959e3 (patch) | |
| tree | 842bf72560b118f2d059be2814b113b35b6f3da3 /sampledata/index.js | |
| parent | 0a1450ada9c20499fa86a619ee36176f717d5414 (diff) | |
| download | coinos-server-staging.tar.gz coinos-server-staging.zip | |
invoices: don't re-list an invoice id on update (dedupe :invoices)staging
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]>
Diffstat (limited to 'sampledata/index.js')
0 files changed, 0 insertions, 0 deletions
