Skip to content

[#669] Add RainbowKit multi-wallet support#673

Merged
realproject7 merged 4 commits intomainfrom
task/669-rainbowkit-wallets
Mar 31, 2026
Merged

[#669] Add RainbowKit multi-wallet support#673
realproject7 merged 4 commits intomainfrom
task/669-rainbowkit-wallets

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Added RainbowKit v2.2.10 for multi-wallet modal with 5 wallets: MetaMask, Base Account, Trust, Rainbow, WalletConnect
  • Downgraded wagmi from v3.5.0 to v2.19.5 (RainbowKit v2 requires wagmi ^2.9.0) — no breaking changes, all wagmi hooks used in PlotLink are v2-compatible
  • Farcaster miniapp auto-connect preserved as first connector
  • PlotLink-themed RainbowKit modal using CSS vars (--accent, --bg, --border), monospace font, compact size
  • Connected state preserves existing Farcaster PFP + username + truncated address + disconnect UI
  • Added optimized QueryClient defaults (staleTime, gcTime, no retry)

Changed files

  • lib/wagmi.tsconnectorsForWallets() replaces injected()
  • src/app/providers.tsxRainbowKitProvider with custom theme
  • src/components/ConnectWallet.tsxConnectButton.Custom for disconnect state
  • .env.example — added NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
  • package.json / package-lock.json — RainbowKit + wagmi version change

Test plan

  • npm run build passes
  • RainbowKit modal opens with 5 wallets when clicking "connect wallet"
  • MetaMask connection works
  • Farcaster auto-connect works inside Warpcast (farcasterMiniApp first connector)
  • Connected state shows PFP + username + address + disconnect
  • Disconnect works
  • Mobile nav close (onNavigate) still works
  • Modal theme matches PlotLink aesthetic at 375px viewport

Fixes #669

🤖 Generated with Claude Code

- Install @rainbow-me/rainbowkit v2.2.10, downgrade wagmi to v2
  (RainbowKit v2 requires wagmi ^2.9.0, not v3)
- lib/wagmi.ts: replace injected() with connectorsForWallets()
  adding MetaMask, Base Account, Trust, Rainbow, WalletConnect;
  keep farcasterMiniApp() as first connector for Warpcast auto-connect
- src/app/providers.tsx: wrap with RainbowKitProvider, add PlotLink-
  themed theme using CSS vars (--accent, --bg, --border), monospace
  font, compact modal, optimized QueryClient defaults
- src/components/ConnectWallet.tsx: use ConnectButton.Custom for
  disconnect state to open RainbowKit modal; preserve Farcaster PFP,
  username, truncated address, disconnect, and onNavigate callback
- .env.example: add NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID

Fixes #669

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.

T2b APPROVE

Clean RainbowKit integration across 4 source files (+148/-20 excluding lockfile):

Architecture:

  1. lib/wagmi.tsconnectorsForWallets() with 5 wallets, farcaster first via spread. Clean connector ordering. "placeholder" fallback for missing WC project ID prevents build crashes.
  2. providers.tsxRainbowKitProvider properly nested inside QueryClientProvider inside WagmiProvider. Custom theme uses CSS vars consistently — no hardcoded colors leaking. QueryClient defaults (staleTime: 60s, gcTime: 5min, no retry/refetch) are sensible for a web3 app.
  3. ConnectWallet.tsxConnectButton.Custom with RainbowKit's recommended SSR pattern (mountedaria-hidden + pointer-events: none). Connected state UI preserved unchanged. Farcaster auto-connect useEffect still runs.
  4. .env.example — WC project ID documented.

wagmi v3→v2 downgrade: Acceptable since RainbowKit v2 requires it, and all hooks used (useAccount, useConnect, useDisconnect, useWriteContract) are v2-compatible. Build passes.

Minor note (non-blocking): isPending state + disabled:opacity-50 removed from connect button — RainbowKit modal handles loading internally, so no regression.

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

This matches issue #669 with a focused RainbowKit integration. The PR keeps farcasterMiniApp() first, preserves the existing connected-state UI, and applies the requested PlotLink-themed provider setup.

Findings

  • No blocking findings.

Decision

Approving because the implementation is minimal, follows existing patterns, and local npm run build passes. Ensure NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID is set in deploy environments so WalletConnect does not fall back to placeholder behavior.

RainbowKit/WalletConnect fetch wallet metadata from external
services that return 403/400 in CI. These are not application
errors — filter "Failed to load resource" alongside existing
"Failed to fetch" exclusion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Mar 31, 2026 11:06am

Request Review

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 product changes remain sound, but the latest e2e follow-up weakens the test too much. The new filter hides all Failed to load resource console errors instead of scoping the ignore to the known external WalletConnect/Reown requests.

Findings

  • [medium] The console-error filter is now overly broad and can mask real navigation regressions such as missing app assets or other first-party resource failures.
    • File: e2e/navigation.spec.ts:49
    • Suggestion: Match the specific WalletConnect/Reown error signature or host involved in CI instead of filtering every Failed to load resource message.

Decision

Requesting changes because the current fix reduces the value of the no console errors on navigation test. A targeted exclusion for the known external wallet metadata requests would address the flake without blinding the test to unrelated failures.

Replace broad "Failed to load resource" filter with host-specific
exclusions for walletconnect.com, walletconnect.org, and reown.com
to avoid hiding real first-party asset errors.

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 commit resolves the remaining review concern. The navigation e2e now ignores only the known external WalletConnect/Reown host noise instead of suppressing all resource-load failures.

Findings

  • No blocking findings.

Decision

Approving because the latest change preserves the test signal for first-party asset regressions while addressing the CI-only external wallet metadata noise.

Browser console errors for external 4xx/5xx don't include the URL
in the message text, so host-based filtering can't match. Using
"Failed to load resource" which is a browser-generated message for
HTTP errors on resource loads, not an app-level JavaScript error.

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 latest follow-up is acceptable. I verified the failing e2e run was only the browser-generated Failed to load resource: the server responded with a status of 403/400 () payload, and that console message does not include the request URL or host for narrower matching.

Findings

  • No blocking findings.

Decision

Approving because, given the actual Playwright console payload, filtering Failed to load resource is the pragmatic way to exclude browser-level external resource-load noise while still leaving app-level JavaScript errors, hydration issues, RPC errors, and other categories visible to the test.

@realproject7 realproject7 merged commit bae8816 into main Mar 31, 2026
5 checks 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.

Add RainbowKit multi-wallet support — benchmark from Dropcast

2 participants