Skip to content

feat: transaction history with filtering by wallet (#887) - #953

Open
adenueltech wants to merge 2 commits into
Stellar-split:mainfrom
adenueltech:feat/issue-887-transaction-history
Open

adenueltech wants to merge 2 commits into
Stellar-split:mainfrom
adenueltech:feat/issue-887-transaction-history

Conversation

@adenueltech

Copy link
Copy Markdown

Closes #887

Summary

Adds a /transactions page showing on-chain transaction history fetched from Horizon, filterable by wallet, date range and transaction type.

Changes

  • src/lib/transactionHistory.ts
    • fetchTransactionHistory() calls Horizon /accounts/{id}/payments?join=transactions and uses cursors to load older pages. A 404 (unfunded account) counts as an empty history.
    • Normalises payments, path payments, account creation, account merges and contract calls into one TxRecord shape, with direction (incoming/outgoing/self), counterparty, memo and fee.
    • filterTransactions() filters by wallet, type, direction, asset and date range, plus free-text search over hash, addresses, memo and amount. The filters can be used alone or together.
    • mergeHistories() combines several wallets and removes duplicates. paginate() handles client-side paging.
    • transactionsToCSV() escapes values and protects against formula injection. transactionsToJSON() exports JSON.
  • src/app/transactions/page.tsx
    • Wallet picker: the connected wallet, saved contacts, or any G… address you add.
    • Filters for date range, direction, asset and type checkboxes, a debounced search box, and a reset button.
    • Table with 20 rows per page, a "Load older transactions" button, a details drawer with a Stellar Expert link, and CSV/JSON export of the filtered results.
  • Adds "Transactions" to the desktop and mobile navigation.

Testing

  • src/lib/__tests__/transactionHistory.test.ts: 12 tests covering normalisation, each filter alone and combined, search, merging and dedup, pagination edge cases, CSV escaping and formula protection, valid JSON, and Horizon fetch, cursor and error handling.
  • npx vitest run on the new and related tests passes, tsc reports no errors in the changed files, and next lint is clean.

🤖 Generated with Claude Code

adenueltech and others added 2 commits October 17, 2026 20:59
- Fetch payment history from Horizon (/accounts/{id}/payments, joined with
  transactions) with cursor-based loading of older pages
- Normalise payments, path payments, account creation/merge and contract calls
- New /transactions page: select connected, saved or manually added wallets;
  filter by date range, type, direction and asset; free-text search over hash,
  addresses, memo and amount; details panel with explorer link; pagination
- Export filtered results as CSV (escaped, formula-injection safe) or JSON
- Navigation links and unit tests

Closes Stellar-split#887

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 17, 2026

Copy link
Copy Markdown

@adenueltech is attempting to deploy a commit to the kingsman-99's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 17, 2026

Copy link
Copy Markdown

@adenueltech 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

This branch has not been deployed

No deployments
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.

Add transaction history and filtering by wallet

1 participant