The submit button and a confirmation modal that summarises the trade before the user "confirms". No real transaction is sent; the modal closes and resets the form.
Requirements
Button states:
| State |
Condition |
| Disabled — "Enter an amount" |
No amount entered |
| Disabled — "Insufficient balance" |
Amount exceeds user balance |
| Disabled — "Insufficient liquidity" |
Output exceeds pool reserve |
| Active — "Swap" |
All inputs valid |
Confirmation modal:
- Summary of: you pay X Token A, you receive at least Y Token B
- Fee, price impact, slippage tolerance, min received
- "Confirm Swap" button → dismisses modal, shows a brief success toast, resets amounts
- "Cancel" button → dismisses modal, preserves amounts
Acceptance criteria
The submit button and a confirmation modal that summarises the trade before the user "confirms". No real transaction is sent; the modal closes and resets the form.
Requirements
Button states:
Confirmation modal:
Acceptance criteria