From bd77cd189ea2c73bb46282e46f97d4a7f735968b Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Thu, 7 May 2026 21:06:22 +0200 Subject: [PATCH 1/2] fix: pass explicit RPC transports to wagmi config components/Web3Providers/index.tsx was calling getDefaultConfig without a transports field, so wagmi fell back to viem's per-chain default RPCs. For mainnet that default is https://eth.merkle.io, which does not return CORS headers from the production origin and rate-limits aggressively. Every L1 read in the browser failed with CORS errors, the resulting viem retry storm prevented RainbowKit's from settling its mounted flag, and the wallet button rendered with opacity: 0 on the migrate routes (which are the only routes that target L1). The regression was introduced in #354 when the project migrated wagmi v1 to v2 and the v1 infuraProvider wiring was removed without a replacement. NEXT_PUBLIC_INFURA_KEY remained in lib/chains.ts but was only consumed by Apollo and the standalone l1PublicClient/l2PublicClient, never by the wagmi config. Reuse the existing NETWORK_RPC_URLS list from lib/chains.ts so wagmi, Apollo, and the standalone viem clients all share one RPC source of truth, and the same NEXT_PUBLIC_INFURA_KEY / NEXT_PUBLIC_L1_RPC_URL / NEXT_PUBLIC_L2_RPC_URL env vars cover all three. Closes #664 Co-Authored-By: Claude Opus 4.7 (1M context) --- components/Web3Providers/index.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/components/Web3Providers/index.tsx b/components/Web3Providers/index.tsx index 55b4163b..940dd76e 100644 --- a/components/Web3Providers/index.tsx +++ b/components/Web3Providers/index.tsx @@ -14,8 +14,14 @@ import { walletConnectWallet, } from "@rainbow-me/rainbowkit/wallets"; import rainbowTheme from "constants/rainbowTheme"; -import { DEFAULT_CHAIN, L1_CHAIN, WALLET_CONNECT_PROJECT_ID } from "lib/chains"; +import { + DEFAULT_CHAIN, + L1_CHAIN, + NETWORK_RPC_URLS, + WALLET_CONNECT_PROJECT_ID, +} from "lib/chains"; import { useMemo } from "react"; +import { fallback, http } from "viem"; import { WagmiProvider } from "wagmi"; const Index = ({ @@ -35,6 +41,12 @@ const Index = ({ projectId: WALLET_CONNECT_PROJECT_ID ?? "", chains, ssr: false, + transports: Object.fromEntries( + chains.map((c) => [ + c.id, + fallback((NETWORK_RPC_URLS[c.id] ?? []).map((url) => http(url))), + ]) + ), wallets: [ { groupName: "Popular", From df7c3ebb4916a049dfedd7b6bede9324f6faf4f3 Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Tue, 12 May 2026 10:41:49 +0200 Subject: [PATCH 2/2] fix: restore "Wrong Network" alert on migrate routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit components/ConnectButton/index.tsx passed chainStatus="none" to the RainbowKit wrapper. In RainbowKit v2 that flag applies display:none to the chain-selector slot — the same slot that renders the red "Wrong network" pill on chain mismatch. Combined with RainbowKit's render guard (!unsupportedChain && ), the whole ConnectButton rendered empty whenever the wallet was on the off-route chain, and the alert never appeared. Use chainStatus="icon" instead: compact on a supported chain, red "Wrong network" pill on mismatch. Co-Authored-By: Claude Opus 4.7 (1M context) --- components/ConnectButton/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ConnectButton/index.tsx b/components/ConnectButton/index.tsx index cd1f62fd..d4da7fbf 100644 --- a/components/ConnectButton/index.tsx +++ b/components/ConnectButton/index.tsx @@ -6,7 +6,7 @@ const ConnectButton = (props: ConnectButtonProps) => { const { width } = useWindowSize(); return (