Skip to content

feat(disputes): add useDisputeDetail hook with on-chain enrichment#238

Open
temisan0x wants to merge 1 commit intoamina69:mainfrom
temisan0x:feat/dispute-detail-hook-193
Open

feat(disputes): add useDisputeDetail hook with on-chain enrichment#238
temisan0x wants to merge 1 commit intoamina69:mainfrom
temisan0x:feat/dispute-detail-hook-193

Conversation

@temisan0x
Copy link
Copy Markdown

Closes #193

What

Implements the useDisputeDetail(disputeId) data fetching hook for the Dispute Detail page.

Changes

  • src/hooks/useDisputeDetail.ts — hook fetching GET /api/disputes/:id, returns dispute shape with escrowOnChainStatus, stellarExplorerUrl, and resolutionTxHash
  • src/mocks/handlers/dispute.ts — extended Dispute type with on-chain fields; added dispute-002 RESOLVED fixture alongside existing OPEN fixture
  • src/hooks/__tests__/useDisputeDetail.test.tsx — unit tests covering OPEN shape, RESOLVED shape, and isNotFound on 404

Notes

  • On-chain fields are enrichment only — field names left generic pending Prisma schema alignment (see TODO in dispute.ts)
  • 404 handling flows through useApiQuery's existing isNotFound logic, no extra state needed

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 27, 2026

@temisan0x Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend · Dispute system UI] Create DisputeDetailPage — data fetching hook

1 participant