Skip to content

Frontend · Multi-party approval UI] Create useAdoptionApprovals hook #174

Description

@amina69

Epic: Multi-party approval UI
Labels: api, state, phase-2, frontend
Size: XS (~2-4 hours)

Description

Hook fetching the approval state for an adoption.

Tasks

  • Create useAdoptionApprovals(adoptionId) using useApiQuery
  • Fetch GET /adoption/:id/approvals
  • Return {required, given, pending, quorumMet, escrowAccountId, isLoading, isError}
  • Refetch every 30s while quorumMet is false (stop once quorum reached)
  • MSW handler with pre-quorum and post-quorum shapes
  • Unit test: polling stops when quorumMet:true

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions