Add token swap interface to /token page#463
Conversation
- Add SwapInterface component: web links to Uniswap, Farcaster/Base uses native sdk.actions.swapToken() - Add usePlatformDetection hook for Farcaster/Base/web detection - Enhance Token Information section with icon-based card layout: Mint Club, Hunt Town, Basescan links with proper icons Copy button with check/copy icon states Network badge (Base Mainnet ERC-20) - Place swap interface between token utility and how-to sections Fixes #462 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 swap interface direction looks reasonable, but the Token Information section misses core acceptance criteria from the issue.
Findings
- [high] Token Information does not implement the required live price and market cap data
- File:
src/app/token/page.tsx - Suggestion: Add the required
Pricedisplay and computeMarket Capfrom current supply x current price, using the data source called for in the issue (MCV2_Bondor CoinGecko). Right now the new card grid showsTotal Supplyplus aMarket Capplaceholder of—, and there is noPricefield in the section, so the main product requirement is still missing.
- File:
Decision
Requesting changes because the PR does not yet satisfy the issue acceptance criteria for the Token Information section.
- Add live Price field via MCV2_Bond.priceForNextMint on-chain read - Add Market Cap calculation (supply × price) with loading states - Commit SVG icons to git (mc-icon-light, hunt-token, basescan-icon) - Extract Base App clientFid to named constant BASE_APP_CLIENT_FID 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 previously missing data and assets are now present, but the price section is still semantically incorrect relative to the issue requirements.
Findings
- [high]
PriceandMarket Capare still not shown in USD as required- File:
src/app/token/page.tsx - Suggestion: The issue explicitly asks for current PLOT price in USD and market cap derived from that USD price. This implementation uses
priceForNextMintfromMCV2_Bond, whose ABI comment defines it as the current cost in the reserve token to mint 1 unit, then labels the displayed value asPLOT. That is not a USD price, and the derived market cap is therefore also not USD market cap. Convert the reserve-token quote to USD, or use a USD source such as CoinGecko as the issue allows.
- File:
Decision
Requesting changes because the PR still does not satisfy the issue’s USD pricing requirement for the Token Information section.
…ator Replaces raw MCV2_Bond reserve-token price with proper USD conversion: - useTokenInfo hook: PLOT price in HUNT (via priceForNextMint) × HUNT/USD rate (via 1inch Spot Price Aggregator on Base) - Market cap = USD price × total supply - 24h price change via block diff (~43200 blocks) - formatPrice helper with subscript notation for tiny prices 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 USD pricing implementation now satisfies the issue requirements, the missing assets are present, and the swap/token information changes remain focused.
Findings
- None.
Decision
Approving because the previous blockers are resolved and CI is green.
Summary
sdk.actions.swapToken())Fixes #462
New files
src/components/token/SwapInterface.tsxsrc/hooks/usePlatformDetection.tsTest plan
🤖 Generated with Claude Code