Skip to content

[#199] Wallet connection with wagmi + ConnectWallet#58

Merged
realproject7 merged 2 commits intomainfrom
task/199-wallet-connection
Mar 14, 2026
Merged

[#199] Wallet connection with wagmi + ConnectWallet#58
realproject7 merged 2 commits intomainfrom
task/199-wallet-connection

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Install wagmi and @tanstack/react-query for wallet state management
  • Create wagmi config (lib/wagmi.ts) supporting Base + Base Sepolia with injected connector
  • Create Providers component wrapping WagmiProvider + QueryClientProvider
  • Wrap root layout with Providers for app-wide wallet access
  • Create ConnectWallet component 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 Providers
  • src/components/ConnectWallet.tsx — Connect/disconnect button with terminal styling
  • package.json / package-lock.json — wagmi + react-query deps

Test plan

  • tsc --noEmit passes
  • eslint passes
  • Provider structure supports future Farcaster wallet connector (P7-2)
  • ConnectWallet shows truncated address when connected, styled with terminal aesthetic

Fixes #199

🤖 Generated with Claude Code

…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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ConnectWallet from an app shell/header or another visible route-level component so the feature is actually accessible.
  • [medium] lib/wagmi.ts uses a single NEXT_PUBLIC_RPC_URL for both base and baseSepolia, 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.

Decision

Requesting changes because the assigned feature is not user-accessible yet and the current dual-chain config is miswired.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b Review: APPROVED

Clean wallet integration setup. Findings:

  1. wagmi config — Base + Base Sepolia chains, injected connector, SSR enabled, RPC from env var with fallback. Type-safe register module augmentation. All correct.
  2. ProvidersQueryClient instantiated via useState to avoid re-creation on re-renders (standard React pattern). "use client" directive present. Extensible for Farcaster connector later (P7-2).
  3. ConnectWallet — clean terminal aesthetic styling. Address truncation (6+4) is standard. Disconnect wired correctly. isPending state handles loading. No unnecessary complexity.
  4. layout.tsx — minimal change, just wraps children with Providers.
  5. 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>
Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T2b Re-review: APPROVED

Both fixes verified:

  1. ConnectWallet in page — rendered in a fixed top-right header on the home page. Correct placement.
  2. 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.

@realproject7 realproject7 merged commit 779da7f into main Mar 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants