[#199] Wallet connection with wagmi + ConnectWallet#58
Conversation
…et component - Install wagmi and @tanstack/react-query - Create lib/wagmi.ts config for Base + Base Sepolia with injected connector - Create Providers component wrapping WagmiProvider + QueryClientProvider - Wrap root layout with Providers for app-wide wallet state - Create ConnectWallet component with terminal aesthetic styling: truncated address display, disconnect button, hover states - Provider structure is extensible for future Farcaster wallet support (P7-2) Fixes #199 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 provider wiring and component scaffold are a reasonable start, but the PR does not yet deliver a usable wallet connection in the app and the chain transport config is incorrect for a two-chain setup.
Findings
- [high] The new wallet UI is not mounted anywhere, so users still have no way to connect a wallet in PlotLink.
- File:
src/components/ConnectWallet.tsx:1 - Suggestion: Render
ConnectWalletfrom an app shell/header or another visible route-level component so the feature is actually accessible.
- File:
- [medium]
lib/wagmi.tsuses a singleNEXT_PUBLIC_RPC_URLfor bothbaseandbaseSepolia, which means one chain will always be configured against the wrong RPC endpoint.- File:
lib/wagmi.ts:9 - Suggestion: Use chain-specific transports (for example default transports, or separate env vars per chain) so Base and Base Sepolia resolve to correct RPCs independently.
- File:
Decision
Requesting changes because the assigned feature is not user-accessible yet and the current dual-chain config is miswired.
project7-interns
left a comment
There was a problem hiding this comment.
T2b Review: APPROVED
Clean wallet integration setup. Findings:
- wagmi config — Base + Base Sepolia chains, injected connector, SSR enabled, RPC from env var with fallback. Type-safe register module augmentation. All correct.
- Providers —
QueryClientinstantiated viauseStateto avoid re-creation on re-renders (standard React pattern)."use client"directive present. Extensible for Farcaster connector later (P7-2). - ConnectWallet — clean terminal aesthetic styling. Address truncation (6+4) is standard. Disconnect wired correctly.
isPendingstate handles loading. No unnecessary complexity. - layout.tsx — minimal change, just wraps children with Providers.
- CI green.
No issues found.
- Render ConnectWallet in page header so users can actually connect - Split NEXT_PUBLIC_RPC_URL to only apply to the active chain; non-active chain falls back to its default public RPC 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 revision resolves the earlier blockers: the wallet connect UI is now mounted in the home page header, and the wagmi transport setup no longer forces the same RPC URL onto both chains. The repo check is passing.
Findings
- None.
Decision
Approving because the assigned wallet-connection feature is now user-accessible, the provider structure remains extensible for future Farcaster work, and lint-and-typecheck is green.
project7-interns
left a comment
There was a problem hiding this comment.
T2b Re-review: APPROVED
Both fixes verified:
- ConnectWallet in page — rendered in a fixed top-right header on the home page. Correct placement.
- RPC URL scoping — custom RPC only applies to the active chain (based on
NEXT_PUBLIC_CHAIN_ID), other chain falls back to default public RPC. Good fix — avoids sending testnet traffic to a mainnet RPC or vice versa.
CI green.
Summary
lib/wagmi.ts) supporting Base + Base Sepolia with injected connectorProviderscomponent wrapping WagmiProvider + QueryClientProviderConnectWalletcomponent with terminal aesthetic (truncated address, disconnect)Files Changed
lib/wagmi.ts— wagmi config (chains, connectors, transports, SSR)src/app/providers.tsx— Client-side provider tree (extensible for Farcaster P7-2)src/app/layout.tsx— Wrap children with Providerssrc/components/ConnectWallet.tsx— Connect/disconnect button with terminal stylingpackage.json/package-lock.json— wagmi + react-query depsTest plan
tsc --noEmitpasseseslintpassesFixes #199
🤖 Generated with Claude Code