Skip to content

feat(frontend): wire escrow acceptance and condition flows#180

Merged
Cedarich merged 1 commit intoStayLitCodes:mainfrom
Dayz-tech-co:feat/143-party-acceptance-condition-flows
Mar 29, 2026
Merged

feat(frontend): wire escrow acceptance and condition flows#180
Cedarich merged 1 commit intoStayLitCodes:mainfrom
Dayz-tech-co:feat/143-party-acceptance-condition-flows

Conversation

@Dayz-tech-co
Copy link
Copy Markdown
Contributor

@Dayz-tech-co Dayz-tech-co commented Mar 29, 2026

Closes #143


Summary

Implements the frontend escrow interaction flows for:

  • party invitation acceptance/rejection
  • seller condition fulfillment
  • buyer condition confirmation

This wires the escrow detail page to the existing condition endpoints, adds richer condition state handling, and refreshes the UI after state transitions.

What Changed

Escrow detail page

  • Added a real ConditionsList to the live escrow detail screen
  • Derived the current party from the connected wallet/user so seller/buyer actions can be shown conditionally
  • Added refresh hooks so the escrow detail view updates after acceptance, fulfillment, and confirmation actions

Party acceptance

  • Added a shared escrow API helper for invitation actions
  • Updated PartiesSection to show a pending invitation banner for the invited party
  • Replaced hard page reloads with escrow refetching after accept/reject
  • Added clearer status messaging for:
    • pending invitations
    • already accepted invitations
    • already rejected invitations
    • cancelled escrows

Condition fulfillment

  • Replaced the stub FulfillConditionModal with a real modal UI
  • Added fields for:
    • fulfillment notes
    • evidence URL/reference
    • file attachment name capture
  • Wired seller fulfillment to:
    • POST /escrows/:id/conditions/:conditionId/fulfill

Condition confirmation

  • Added buyer confirmation actions for fulfilled conditions
  • Wired confirmation to:
    • POST /escrows/:id/conditions/:conditionId/confirm
  • Added a warning when confirming the last outstanding fulfilled condition because it may trigger automatic fund release
  • Added visual state for:
    • pending fulfillment
    • fulfilled / awaiting buyer confirmation
    • confirmed
  • Displayed fulfillment/confirmation timestamps and actor metadata where available

Types / data layer

  • Expanded frontend escrow types to match backend condition fields like:
    • isFulfilled
    • fulfilledAt
    • fulfillmentNotes
    • fulfillmentEvidence
    • isMet
    • metAt
  • Added a shared frontend escrow API helper
  • Updated useEscrow to support refetch()

Notes / Known Gaps

  • The frontend is wired for party acceptance/rejection at:
    • POST /escrows/:id/parties/:partyId/accept
    • POST /escrows/:id/parties/:partyId/reject
  • I could not find these backend endpoints implemented in the current backend branch, so this frontend path will need matching backend support to be fully functional.
  • Buyer-facing "Reject" for fulfilled conditions is surfaced in the UI, but there is no backend reject-condition endpoint yet, so it currently shows guidance instead of persisting a rejection.

Verification

Completed

  • Confirmed the condition fulfillment and confirmation backend endpoints already exist
  • Pushed branch to GitHub successfully

Blocked by existing repo issues

  • npm run lint fails because the repo-level ESLint config is currently using require while being loaded as ESM
  • npx tsc --noEmit reports broad pre-existing frontend dependency/type-resolution issues unrelated to this change

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@Dayz-tech-co 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

@Cedarich Cedarich merged commit d670db4 into StayLitCodes:main Mar 29, 2026
1 check passed
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] Build Party Acceptance/Rejection and Condition Fulfillment Flows

2 participants