Skip to content

Conversation

@shamoo53
Copy link
Contributor

✨ Build Escrow Detail Page

Closes #13

🧩 Overview

This PR introduces a comprehensive Escrow Detail Page that gives users full visibility into an individual escrow agreement and serves as the central place for escrow-related actions.

The page improves transparency, trust, and usability by clearly displaying escrow terms, participant statuses, transaction history, and a real-time timeline of events β€” all in a responsive, user-friendly layout.

🚩 Problem Statement

Before this change:

❌ No dedicated view for individual escrow agreements

❌ Users could not see counterparty roles or confirmation status

❌ Escrow timelines and on-chain transaction history were hidden

❌ Actions like confirm, dispute, or release lacked proper context

This made it difficult for users to make informed decisions and reduced confidence in the escrow process.

🎯 Solution

A new Escrow Detail Page available at:

/escrow/[id]

This page provides a complete, structured view of an escrow agreement and dynamically adapts based on user role and escrow state.

🧱 Page Structure & Features
🧾 Header Section

Escrow title / identifier

Status badge (Pending, Funded, Released, Disputed, etc.)

Quick action buttons (role-aware)

πŸ‘₯ Parties Section

Escrow participants’ wallet addresses

Clearly defined roles (Initiator, Counterparty)

Confirmation status indicators per party

πŸ“œ Terms Section

Escrow amount (properly formatted)

Conditions / description

Deadline with real-time countdown timer

πŸ•’ Timeline Section

Chronological display of escrow events:

Creation

Deposits

Confirmations

Disputes

Releases

πŸ”— Transaction History

List of on-chain transactions

Direct links to the Stellar Explorer

External links open in new tabs

⚑ Conditional Actions

Action buttons rendered dynamically based on:

Current user role

Escrow state

Includes:

βœ… Confirm

⚠️ Dispute

πŸš€ Release

πŸ” Additional UX Enhancements

πŸ“‹ Share / copy escrow link (clipboard support)

πŸ“± Fully mobile-responsive layout

🚫 404 handling for invalid or non-existent escrow IDs

⏳ Loading and error states

πŸ› οΈ Implementation Details
πŸ“ New Page
src/app/escrow/[id]/page.tsx

🧩 Components
src/components/escrow/detail/
β”œβ”€β”€ EscrowHeader.tsx
β”œβ”€β”€ PartiesSection.tsx
β”œβ”€β”€ TermsSection.tsx
β”œβ”€β”€ TimelineSection.tsx
β”œβ”€β”€ TransactionHistory.tsx

πŸ”˜ Action Components

ConfirmButton

DisputeButton

ReleaseButton

πŸ”Œ Hooks & Utilities

useEscrow.ts for data fetching

Deadline countdown component

Clipboard-based share utility

πŸ§ͺ Testing & Validation

The following scenarios were tested and verified:

βœ… Correct escrow loads by ID

🚫 Invalid escrow ID returns a 404 page

πŸ” Action buttons show/hide based on role and state

πŸ•’ Timeline renders events in correct chronological order

πŸ”— Transaction links open Stellar Explorer correctly

⏱ Countdown timer updates in real time

πŸ“‹ Share button copies escrow URL to clipboard

πŸ“± Responsive behavior on mobile screens

Closes #13

@Cedarich
Copy link
Contributor

@shamoo53 please run npm run lint, and address the few lint errors. Thank you for this solid implementation

@Cedarich Cedarich merged commit 2b12de8 into StayLitCodes:main Jan 30, 2026
1 check failed
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.

Build Escrow Detail Page

2 participants