Skip to content

Add server-side cursor pagination and incremental polling #243

@schjonhaug

Description

@schjonhaug

Parent: #236 (Phase 2)

Problem

GET /api/wallets/{checksum}/detail returns up to 10,000 transactions with no pagination. Users with 10K+ transactions silently lose visibility of older history. Every 60-second poll re-downloads the full payload (~5.5 MB at 10K tx).

What to change

Server-side cursor pagination

  • Add cursor and page_size query parameters to the detail endpoint
  • Paginate on (confirmed_at, txid) composite cursor
  • Default page size: 50–100 transactions
  • Return next_cursor in response for the frontend to fetch more

Incremental polling

  • Add since_timestamp parameter to fetch only new/changed transactions since last poll
  • Frontend sends last-known timestamp, API returns only the delta
  • Dramatically reduces bandwidth on subsequent polls

Key files

  • backend/src/handlers/wallet.rs — detail endpoint
  • backend/src/metadata/transaction.rs — query with pagination
  • frontend/src/hooks/useWalletDetail.ts — polling logic
  • frontend/src/components/transactions.tsx — infinite scroll / load more

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions