Description
The account page currently shows only the account's static state — balance, signers, home domain, flags. This issue adds a Recent Transactions tab that fetches and displays the account's last 10 transactions, each one clickable to navigate to the full transaction explanation at /tx/:hash.
This transforms the account page from a static snapshot into a live activity feed and is the frontend counterpart to the backend history endpoint.
Depends on: BE — Add transaction history endpoint for accounts (must be merged first)
What To Build
Update src/lib/api.ts
Add a typed fetch function:
export async function fetchAccountHistory(
address: string,
limit = 10
): Promise<AccountHistoryResponse>
Add GET /api/account/[address]/history/route.ts
New Next.js proxy route — follows the exact same pattern as the existing /api/account/[address]/route.ts.
Update src/types/index.ts
export interface AccountHistoryTransaction {
transaction_hash: string;
successful: boolean;
summary: string;
ledger_closed_at: string | null;
ledger: number | null;
operation_count: number;
fee_explanation: string | null;
}
export interface AccountHistoryResponse {
address: string;
transactions: AccountHistoryTransaction[];
next_cursor: string | null;
has_more: boolean;
}
Create src/components/account/TransactionHistoryTab.tsx
- Fetches from
/api/account/:address/history on mount
- Shows a loading skeleton while fetching
- Each row shows: status dot (green/red), condensed summary, relative time, operation count badge
- Clicking any row navigates to
/tx/:hash
- Load more button at the bottom when
has_more: true
- Empty state when no transactions
- Error state when fetch fails
Update src/app/account/[address]/page.tsx
Add a tab switcher below the account header:
[ Overview ] [ Recent Transactions ]
- Overview tab = existing account result cards (unchanged)
- Recent Transactions tab = new
TransactionHistoryTab component
- Active tab persists in URL hash (
#overview / #history) so links are shareable
Key Files
New files:
src/components/account/TransactionHistoryTab.tsx
src/app/api/account/[address]/history/route.ts
Modified files:
src/types/index.ts
src/lib/api.ts
src/app/account/[address]/page.tsx
Acceptance Criteria
Complexity: High · 200 pts
Depends on: BE — Add transaction history endpoint (must be merged first)
Description
The account page currently shows only the account's static state — balance, signers, home domain, flags. This issue adds a Recent Transactions tab that fetches and displays the account's last 10 transactions, each one clickable to navigate to the full transaction explanation at
/tx/:hash.This transforms the account page from a static snapshot into a live activity feed and is the frontend counterpart to the backend history endpoint.
Depends on: BE — Add transaction history endpoint for accounts (must be merged first)
What To Build
Update
src/lib/api.tsAdd a typed fetch function:
Add
GET /api/account/[address]/history/route.tsNew Next.js proxy route — follows the exact same pattern as the existing
/api/account/[address]/route.ts.Update
src/types/index.tsCreate
src/components/account/TransactionHistoryTab.tsx/api/account/:address/historyon mount/tx/:hashhas_more: trueUpdate
src/app/account/[address]/page.tsxAdd a tab switcher below the account header:
TransactionHistoryTabcomponent#overview/#history) so links are shareableKey Files
New files:
src/components/account/TransactionHistoryTab.tsxsrc/app/api/account/[address]/history/route.tsModified files:
src/types/index.tssrc/lib/api.tssrc/app/account/[address]/page.tsxAcceptance Criteria
/tx/:hashComplexity: High · 200 pts
Depends on: BE — Add transaction history endpoint (must be merged first)