Skip to content

[frontend] Withdraw form: share input + proportional preview + tx state machine #53

@ozpool

Description

@ozpool

Context

Withdraw counterpart to #52.

Ref: PRISM_PRD_v1.0.html §Day 2, §Day 5.

Scope

In scope:

  • components/vault/WithdrawForm.tsx
  • hooks/useWithdraw.ts
  • Proportional preview of token0/token1 amounts
  • Works even if deposits are paused (never-pausable guarantee)

Out of scope:

  • Anything not listed above.

Acceptance Criteria

  • Proportional preview matches on-chain exactly to ≤ 1 wei drift
  • All tx states rendered (idle/pending/success/error/wrong-network)
  • wagmi v2 + viem v2 (not ethers)
  • ABIs from packages/shared (never hand-maintained)
  • Keyboard navigable; semantic HTML; WCAG AA contrast
  • Responsive at 320 / 768 / 1280
  • pnpm typecheck && pnpm lint && pnpm test pass

Dependencies

References

  • N/A

Estimate

M

Metadata

Metadata

Assignees

Labels

layer:frontendNext.js / wagmi / React / Tailwindpriority:p0-blockerBlocks the critical pathstatus:readyScoped and ready to pick uptype:featureNew capability or deliverable

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions