Repository navigation
feat(market): add per-market on-chain activity feed tab (#1032) - #1063
Merged
greatest0fallt1me merged 1 commit intoNov 23, 2026
Conversation
|
@ranjeetprabhatedu-dotcom is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
9 tasks
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
Implements a per-market on-chain activity feed tab displaying live contract events (
bet,claim,dispute) with cursor-based pagination, virtualization, and accessible feed semantics.Closes #1032
Changes
lib/stellar/market-activity.ts:MarketActivityEventinterface (id, type, address, amount, outcome, ledgerClosedAt, txHash).parseContractEventandparseContractEventssafely mapping contract topics/data into normalized events and gracefully ignoring unknown/malformed types without throwing.fetchMarketActivitysupporting cursor pagination, limit, abort signals, and injectable fetchers.hooks/useMarketActivity.ts:loadMore), error handling, and manual retry.components/market/MarketActivityFeed.tsx:@tanstack/react-virtualwith estimated row heights for high-volume event performance.role="feed",aria-busy, rowrole="article",aria-posinset, andaria-setsize.CopyAddressfor masked address display and clipboard copy, andTimestampfor relative/absolute time tooltips.app/markets/[id]/MarketDetailClient.tsx:<MarketActivityFeed marketId={marketId} />into theactivitytab slot ofMarketDetailTabs.lib/stellar/__tests__/market-activity.test.ts: verified parser rules (bet, claim, dispute), unknown type drops, missing address/amount handling, and fetcher behavior (13/13 passing).components/market/__tests__/MarketActivityFeed.test.tsx: verified skeleton loading, empty state, error + retry, feed accessibility, deduplication across pages, market switch mid-flight, and 1,000-item virtualizer rendering window (8/8 passing).Verification
pnpm test -- lib/stellar/__tests__/market-activity.test.ts components/market/__tests__/MarketActivityFeed.test.tsx components/market/__tests__/market-detail-tabs.test.tsxpnpm exec eslint lib/stellar/market-activity.ts lib/stellar/__tests__/market-activity.test.ts hooks/useMarketActivity.ts components/market/MarketActivityFeed.tsx components/market/__tests__/MarketActivityFeed.test.tsx app/markets/[id]/MarketDetailClient.tsx