Tag

#express

5 posts

Resonate brand card on a dark background with a teal spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

One-click buy with a durable cancellation window in TypeScript on Resonate

A one-click checkout where the cancellation window is a durable `ctx.run` over a Promise race, not a `PENDING / CONFIRMED / CANCELLED` state row.

Start a purchase, open a 5-second window in which the user can cancel, then confirm or cancel. The window is one `ctx.run` over a Promise that races a timer against an EventEmitter signal — checkpointed, so a crash mid-window resumes from where it left off.