aboutsummaryrefslogtreecommitdiffstats
path: root/routes/payments.ts
Commit message (Collapse)AuthorAgeFilesLines
* don't remove orphan payment ids from user payment listsAdam Soltys2026-05-171-6/+4
| | | | | | | | | | When the underlying payment record is missing, removing the id from the user's payments list was destructive — a transiently unavailable record (arc fallback miss, database hiccup) would cause us to permanently drop the pointer. Leave the orphan in place so a back-fill from an RDB backup can restore the record under the same id later. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* mirror payment records to arc + atomic /confirm lock to prevent double-creditsAdam Soltys2026-05-171-3/+25
| | | | | | | | | | | | | | | | | | | | | Apr 29 double-credit prevention, ported from master 0e368dab and adapted to staging's hono/tigerbeetle structure. Two parallel callers of /confirm (walletnotify, catchUp, bulk sweeps) could each read p.confirmed=false and each run tbConfirm — doubling the pending→balance transfer. tbConfirm itself isn't idempotent on its own, so the race materializes as a real double-credit even with TB. - routes/payments.ts: SET NX EX 60 lock around the confirmation block keyed by `confirmlock:${txid}:${vout}`. Concurrent callers short-circuit cleanly. Released on success and on every early-return. - lib/payments.ts credit() + routes/payments.ts /confirm: mirror payment + invoice records and the `payment:<txid>:<vout>` / `payment:<hash>` pointer keys into arc as soon as they're written. gf() will then find the prior credit via arc fallback even if the main-db copy is wiped by a future data-loss event. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* remove /gateway endpointAdam Soltys2026-05-171-8/+0
| | | | | | | | | | | Unauthenticated arbitrary db.set abuse vector. Exploited on the master deployment to inflate user balances and override safety controls in real time, leading to a hot-wallet drain. Route and handler both fully removed; if a webhook-by-short-channel-id mapping is ever needed again it must be rebuilt with auth + SCID format validation + webhook URL validation + per-user ownership check. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
* verify ark amountsAdam Soltys2026-03-221-18/+29
|
* fix: add account ownership checks and harden PIN validationAdam Soltys2026-03-171-2/+6
| | | | | | | | - Validate account ownership (aid) before allowing ark send/sync/vault operations and in debit/sendOnchain as defense-in-depth - Harden PIN check to reject missing/empty pin when user has one set Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
* tx recalcAdam Soltys2026-03-111-1/+1
|
* try to cpfp piggyback on in flight withdrawalsAdam Soltys2026-03-111-1/+0
|
* remove bumpestimateAdam Soltys2026-03-111-27/+7
|
* fund authorizationsAdam Soltys2026-03-041-6/+53
|
* funds routeAdam Soltys2026-03-041-0/+19
|
* vault wallet fixesAdam Soltys2026-03-031-1/+1
|
* sync vaultAdam Soltys2026-03-031-0/+69
|
* request tuningAdam Soltys2026-03-031-20/+45
|
* fee bumpingAdam Soltys2026-03-021-31/+35
|
* log ark wallet balanceAdam Soltys2026-03-011-5/+2
|
* fix hono route orderAdam Soltys2026-02-281-0/+12
|
* fix typescript issuesAdam Soltys2026-02-281-9/+9
|
* migrate to honoAdam Soltys2026-02-281-193/+165
|
* fix ark vault to custodial sendsAdam Soltys2026-02-261-29/+100
|
* formattingAdam Soltys2026-02-241-57/+29
|
* migrate funds to tbAdam Soltys2026-02-181-8/+8
|
* passkey authAdam Soltys2026-02-161-1/+30
|
* fix custodial bitcoin sendsAdam Soltys2026-02-151-7/+17
|
* ark refreshAdam Soltys2026-02-151-0/+1
|
* fix custodial sendsAdam Soltys2026-02-151-15/+12
|
* custodial ark sendsAdam Soltys2026-02-141-15/+51
|
* ark payment notificationsAdam Soltys2026-02-131-1/+33
|
* fix onchain confirmationsAdam Soltys2026-02-131-29/+8
|
* filter null managersAdam Soltys2026-02-101-2/+2
|
* ark fixesAdam Soltys2026-02-091-103/+34
|
* ark fixesAdam Soltys2026-02-091-38/+169
|
* payment forwardingAdam Soltys2026-02-061-8/+18
|
* fix ark handlingAdam Soltys2026-02-061-4/+7
|
* tigerbeetleAdam Soltys2026-02-061-15/+7
|
* remove reconcile paymentsAdam Soltys2026-02-061-0/+6
|
* zmq logicAdam Soltys2026-02-061-10/+46
|
* custodial ark paymentsAdam Soltys2026-02-061-25/+19
|
* ark syncAdam Soltys2026-02-061-1/+61
|
* arkAdam Soltys2026-02-061-0/+67
|
* consult archive for older paymentsAdam Soltys2026-01-301-2/+3
|
* read payments from archiveAdam Soltys2026-01-221-5/+18
|
* check usernameAdam Soltys2026-01-191-1/+1
|
* get lnaddress fee from bodyAdam Soltys2025-11-171-1/+2
|
* remove default feeAdam Soltys2025-11-161-2/+2
|
* don't credit dustAdam Soltys2025-09-291-0/+1
|
* sendinvoice supportAdam Soltys2025-09-181-0/+29
|
* received flag for paymentsAdam Soltys2025-09-131-10/+10
|
* check for existenceAdam Soltys2025-08-101-2/+2
|
* authorizationsAdam Soltys2025-08-101-5/+25
|
* authorization claimed flagAdam Soltys2025-08-081-2/+3
|