refactor(launch): collapse helcim-pay duplication and use setAuthCookie helper
Follow-up to51230e5. /simplify review surfaced residual duplication and a timer leak. - useHelcimPay: extract _initializeTicket(metadata, errorPrefix) to collapse initializeTicketPayment + initializeSeriesTicketPayment (95% identical bodies). Drop the dead `amount` arg from initialize- TicketPayment — server re-derives ticket amounts in initialize- payment.post.js and never reads body.amount for ticket types. Capture timer ids and clearTimeout on resolve/reject so the 10-min payment timer and 5-second observer timer stop leaking after every payment. - EventTicketPurchase: caller updated for the dropped arg. - verify.post.js: replace inline jwt.sign + setCookie block with the setAuthCookie(event, member) helper. verify was the last hand-rolled caller after the helper was extracted in208638e. - LAUNCH_READINESS: add simplify-pass-followups bullet pointing to the six deferred items in docs/TODO.md. Tests: 758 passing, 2 skipped, 0 failing.
This commit is contained in:
parent
51230e5151
commit
8e76ce9366
4 changed files with 24 additions and 70 deletions
|
|
@ -122,6 +122,7 @@ See `docs/TODO.md` for:
|
|||
- Members table NAME column clipping.
|
||||
- OWASP ASVS L1 Phase 4 (file-upload validation pipeline, granular RBAC, credential encryption).
|
||||
- `tickets/available.get.js:115` `memberSavings` block reports `$0 saved` for inactive members — cosmetic; suppress comparison block when `!hasMemberAccess(member)` if it ever surfaces in UI.
|
||||
- Simplify-pass follow-ups (2026-04-25): source-grep test bloat, login/verify rate-limit gap, stringly-typed `metadata.type`, reconcile-payments sequential loop, stale `new Date()` in events list, `loadPublicSeries` helper extraction.
|
||||
|
||||
### Known gotchas worth addressing post-launch
|
||||
|
||||
|
|
@ -148,3 +149,4 @@ Context: Phase 4 audit against `docs/specs/events-visual-audit-findings.md` fixe
|
|||
- Update stale tier comment in `app/composables/useMemberPayment.js:59`.
|
||||
- Update error log message referencing "tier" in `server/api/members/update-contribution.post.js:221`.
|
||||
- Rename `handleUpdateTier` handler in `app/pages/member/account.vue`.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue