Skip to content

[frontend] Deposit form: paired amount inputs + approval flow + preview + tx state machine #52

@ozpool

Description

@ozpool

Context

Primary LP action. Explicit tx state machine — no boolean flags.

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

Scope

In scope:

  • components/vault/DepositForm.tsx
  • hooks/useDeposit.ts
  • Approval + deposit flow
  • Preview: expected shares + implied tick distribution

Out of scope:

Acceptance Criteria

  • Approval flow covers: none / partial / sufficient allowance
  • Tx state machine is single discriminated union
  • 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

  • wagmi useWriteContract

Estimate

L

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