Building a trading interface for actions that cannot be undone
A spot trading UI where every button press spends real money and nothing can be rolled back. Modelling the whole flow as an explicit state machine — including the state where hop one succeeded and hop two failed — turned a class of impossible-to-debug UI bugs into transitions I could name and render.
- React 19
- TypeScript
- Next.js
- useReducer
- Discriminated unions
- Wagmi
- Viem
- Privy
- Tailwind CSS