[#773] Show Market Cap USD + 24h change instead of Token Price#779
[#773] Show Market Cap USD + 24h change instead of Token Price#779realproject7 merged 3 commits intomainfrom
Conversation
…ine page Replace the Token Price box in StoryHeader with a Market Cap box showing totalSupply * pricePerToken * plotUsd in USD, plus 24h percent change with green/red coloring. Supply Minted box unchanged. New MarketCapBox client component fetches plotUsd and 24h price change data client-side. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
project7-interns
left a comment
There was a problem hiding this comment.
T2b APPROVE
Clean implementation:
- New
MarketCapBoxclient component properly isolates USD price and 24h change fetching - Market cap formula correct:
totalSupply * pricePerToken * plotUsd - 24h change query uses 60s stale time, consistent with other price queries
- Returns null while
plotUsdloads — no flash of incomplete data - Supply Minted box untouched as required
No concerns.
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The Market Cap UI change is close, but the new client component bypasses the repo's shared RPC configuration and hardcodes Base mainnet for the 24h change fetch.
Findings
- [medium]
MarketCapBoxcreates its owncreatePublicClient({ chain: base, transport: http() }), which ignoresNEXT_PUBLIC_CHAIN_IDand the shared fallback/CORS RPC setup inlib/rpc.ts. In Base Sepolia or any non-mainnet environment, this will fetch the 24h change from the wrong chain or fail inconsistently even though the rest of the app uses the environment-aware shared client.- File:
src/components/MarketCapBox.tsx:11 - Suggestion: Reuse the existing browser-safe client from
lib/rpc.ts(or another shared chain-aware helper) instead of creating a hardcoded Base client inside the component.
- File:
Decision
Requesting changes because the current implementation introduces incorrect environment behavior in a shared storyline-header metric.
Replace hardcoded Base mainnet client with the shared chain-aware browserClient from lib/rpc.ts for correct behavior across environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The chain-aware RPC fix is in place, but the storyline header refactor still leaves unused symbols behind in the page module.
Findings
- [medium]
src/app/story/[storylineId]/page.tsxstill importsUsdPriceTageven though the Token Price box was removed, andStoryHeaderstill declaresconst reserveLabel = RESERVE_LABEL;without using it. If the repo's lint step treats unused imports/locals as errors, this will faillint-and-typecheckeven though the runtime behavior is otherwise correct.- File:
src/app/story/[storylineId]/page.tsx:26 - File:
src/app/story/[storylineId]/page.tsx:263 - Suggestion: Remove the unused
UsdPriceTagimport and the unusedreserveLabellocal fromStoryHeader.
- File:
Decision
Requesting changes because the PR still appears to contain a straightforward lint blocker after the refactor.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up change resolves the remaining issues in the storyline header refactor: MarketCapBox now uses the shared browser RPC client, and the page module cleanup removed the unused import/local left behind by the Token Price replacement.
Findings
- None.
Decision
Approving because the Market Cap USD + 24h change box now matches issue #773 without the environment regression or lint blocker from the earlier revisions.
Summary
totalSupply * pricePerToken * plotUsd, displayed in USDget24hPriceChange()MarketCapBoxclient component handles USD price and 24h change fetchingFixes #773
Test plan
npm run buildpasses🤖 Generated with Claude Code