Transaction lifecycle
Every swap and order runs through one state machine. Private mode has its own flow. Try it.
IdlePreparingApprove in walletApprovingApprovedSigningConfirm in walletPendingSuccess
FailedReview new price
Current phase
IdleButton shows
SwapReady
isBusy = falseEvents
Path so far: Idle
Source: src/features/swap/tx-machine.ts
Phases
PreparingButton locked
Approve in walletButton lockedYour wallet is open
SigningButton lockedYour wallet is open
Confirm in walletButton lockedYour wallet is open
PendingButton locked
Success · Failed · Review new priceButton free
15 s: taking longer120 s: status unknown
Source: src/features/swap/tx-machine.ts · src/lib/wallet/confirm-tx.ts
Safe by construction
- Double-clickSecond click ignored
- Price drops > 0.5%Stops at Review new price
- Reject in walletBack to idle, nothing sent
Source: src/features/swap/use-swap-execution.ts