Summary
The frontend currently uses mock/simulated data with fake API delays throughout services/escrow.ts. All data fetching hooks (useEscrows, useEscrow, useEvents) consume this mock layer. The frontend must be wired to the real NestJS backend API.
Current State
services/escrow.ts contains an EscrowService class with methods (getEscrows(), getEscrowById(), getEvents(), createEscrow(), updateEscrowStatus()) that all return hardcoded/mock data with simulated setTimeout delays (500-1000ms)
hooks/useWallet.ts is a mock hook returning a hardcoded test public key instead of using the real WalletContext
- No API base URL configuration exists
- No auth token injection in API requests
- React Query hooks have no real endpoint backing them
Acceptance Criteria
Summary
The frontend currently uses mock/simulated data with fake API delays throughout
services/escrow.ts. All data fetching hooks (useEscrows,useEscrow,useEvents) consume this mock layer. The frontend must be wired to the real NestJS backend API.Current State
services/escrow.tscontains anEscrowServiceclass with methods (getEscrows(),getEscrowById(),getEvents(),createEscrow(),updateEscrowStatus()) that all return hardcoded/mock data with simulatedsetTimeoutdelays (500-1000ms)hooks/useWallet.tsis a mock hook returning a hardcoded test public key instead of using the realWalletContextAcceptance Criteria
NEXT_PUBLIC_API_URLenv var)EscrowServicewith real HTTP calls to backend endpoints:GET /escrows(list with filters/pagination)GET /escrows/:id(detail with relations)POST /escrows(create)POST /escrows/:id/fund(fund)POST /escrows/:id/release(release)POST /escrows/:id/cancel(cancel)POST /escrows/:id/dispute(file dispute)POST /escrows/:id/conditions/:conditionId/fulfill(fulfill)POST /escrows/:id/conditions/:conditionId/confirm(confirm)GET /escrows/:id/events(event history)POST /auth/challenge-> sign with wallet ->POST /auth/verify-> store JWTuseWallethook usage with realuseWalletConnectionfromWalletContext