Skip to content

Submit Button & Mock Confirmation Modal #58

@0x-r4bbit

Description

@0x-r4bbit

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

  • Button label and disabled state reflect current input validity
  • Modal renders the correct summary values (not stale)
  • Confirming clears the input fields and shows a success toast
  • Cancelling leaves all fields unchanged

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions