feat(transactions): wallet transaction history via Horizon#161
Open
aunysillyme wants to merge 1 commit into
Open
feat(transactions): wallet transaction history via Horizon#161aunysillyme wants to merge 1 commit into
aunysillyme wants to merge 1 commit into
Conversation
…protocol#63) Adds a new /transactions page that fetches on-chain operations for the SoroSave contract from the Stellar Horizon API. Implements: - src/lib/horizon.ts: fetch()-based Horizon client with typed transaction and operation models, cursor-based pagination, and a 30s in-memory response cache to limit API hits. - src/app/transactions/page.tsx: paginated, filterable transaction list with operation-type labels, success/failure status, relative times, and deep links to Horizon for each tx. - Navbar: link to /transactions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #63.
Adds a new
/transactionspage that fetches on-chain transaction history for the SoroSave contract directly from the Stellar Horizon API.src/lib/horizon.ts—fetch()-based Horizon client (no extra SDK pulled in). Exposes:fetchTransactionsForAccount(address, { limit, cursor, order })fetchOperationsForAccount(address, { limit, cursor, order })(includes failed ops)formatOperationType+summarizeOperationpair for rendering payments, contract invocations, path payments, trustline changes, offers, TTL extensions, etc.src/app/transactions/page.tsx— paginated transaction list. ReadsNEXT_PUBLIC_CONTRACT_IDfrom the env (with an inline address override input for ad-hoc browsing), shows operation type, summary, relative timestamp, success/failure, and a deep link to the Horizon tx page.← Newer / Older →buttons walk forward and back through cursor pages.Navbar— adds a Transactions link.Horizon URL defaults to
https://horizon-testnet.stellar.organd is overridable viaNEXT_PUBLIC_HORIZON_URL.Acceptance criteria (from issue)
Test plan
pnpm devand navigate to/transactions— list renders, pagination works, deep links open HorizonNEXT_PUBLIC_CONTRACT_IDset, the page prompts for an address and the inline input loads itNEXT_PUBLIC_HORIZON_URLto mainnet Horizon and confirm it queries the right hostNotes
This PR is AI-assisted (Claude Code). Author reviewed the diff before opening.
/claim #63