Depends on: #434 (lib/zap.ts must be updated first)
Summary
Update TradingWidget.tsx to support multiple input tokens on the buy tab.
Token Selector
Add token selector on buy tab with options:
- ETH — payable via Zap, no approval needed
- USDC — approve to Zap → mint (two-step)
- HUNT — approve to Zap → mint (two-step)
- PLOT — direct MCV2_Bond.mint (existing behavior, no Zap)
Default: ETH
UI
- Minimal toggle/dropdown matching existing design (monospace,
text-xs, border tokens)
- Show balance for selected input token
- Show estimate in selected input token
- For ERC-20 inputs: "Approving..." → "Confirm in wallet..." flow (same pattern as current PLOT approve → mint)
Behavior
- ETH:
writeContractAsync({ value: ethCost }) — payable, no approval step
- USDC/HUNT: check allowance → approve if needed →
writeContractAsync() with no value
- PLOT: existing
MCV2_Bond.mint flow unchanged (no Zap contract involved)
- Sell tab: unchanged — always returns PLOT via
MCV2_Bond.burn
isZapAvailable check remains (hides selector when Zap address is zero)
- Trade indexing (
/api/index/trade POST) fires for all modes
Acceptance Criteria
Branch
Same branch as #434: task/432-zap-v2-frontend in plotlink repo (combine in one PR)
Parent: #432
Depends on: #434 (lib/zap.ts must be updated first)
Summary
Update
TradingWidget.tsxto support multiple input tokens on the buy tab.Token Selector
Add token selector on buy tab with options:
Default: ETH
UI
text-xs, border tokens)Behavior
writeContractAsync({ value: ethCost })— payable, no approval stepwriteContractAsync()with no valueMCV2_Bond.mintflow unchanged (no Zap contract involved)MCV2_Bond.burnisZapAvailablecheck remains (hides selector when Zap address is zero)/api/index/tradePOST) fires for all modesAcceptance Criteria
Branch
Same branch as #434:
task/432-zap-v2-frontendin plotlink repo (combine in one PR)