Skip to content

[Phase 2] feat(ui): dashboard — account fee history page #90

@Tinna23

Description

@Tinna23

Overview

Add a dedicated /dashboard/account route where a user pastes a Stellar account address and sees a full breakdown of fees paid by that account — total spend, averages, and a transaction-by-transaction history.

Route

/dashboard/account — search entry page
/dashboard/account/[address] — results page (or inline on same page)

Acceptance Criteria

Route & Page

  • src/app/dashboard/account/page.tsx — search entry
  • src/app/dashboard/account/[address]/page.tsx — results (or handle inline)
  • Add fetchAccountFeeHistory(address: string): Promise<AccountFeeHistory> to src/lib/api.ts
  • Add AccountFeeHistory, AccountFeeSummary, AccountTransaction types to src/lib/types.ts

Search UI

  • Input field accepting a Stellar account address (starts with G, 56 chars)
  • Client-side validation: must start with G and be 56 characters
  • Loading state while fetching
  • Clear error for invalid format or account not found

Summary Cards

Four stat cards displayed at the top of results:

  • Total Fees Paid — sum in stroops
  • Transactions — total count
  • Avg Fee — average fee charged
  • Max Fee — highest single fee paid

Fee History Chart

  • Recharts LineChart or BarChart showing fee paid per transaction over time
  • X-axis: transaction timestamp
  • Y-axis: fee in stroops
  • Hoverable tooltip per transaction showing hash (truncated), fee, and date

Transaction Table

  • Paginated table (10 rows per page) showing:
    • Truncated hash (first 8 + last 8 chars) with copy button
    • Fee charged (stroops)
    • Date/time
    • Link to Stellar Expert explorer
  • Table sortable by fee (ascending / descending)

Navigation

  • Add ACCOUNT link to the dashboard nav/sidebar

Type Shapes

export interface AccountTransaction {
  hash: string;
  fee_charged: number;
  ledger: number;
  created_at: string;
}

export interface AccountFeeSummary {
  total_fees_paid: number;
  transaction_count: number;
  avg_fee: number;
  max_fee: number;
  min_fee: number;
}

export interface AccountFeeHistory {
  address: string;
  summary: AccountFeeSummary;
  transactions: AccountTransaction[];
}

Notes

  • Stellar Expert account URL: https://stellar.expert/explorer/testnet/account/{address}
  • Related backend issue: [Phase 2] feat(core): account fee history endpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendFrontend / UI work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions