From c0ea54d428f178766be25ff1d0cccfede9c1a073 Mon Sep 17 00:00:00 2001 From: Jack Hamer Date: Sun, 24 Mar 2024 11:42:18 +0200 Subject: [PATCH] fix: use public l1 rpc providers --- data/wagmi.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data/wagmi.ts b/data/wagmi.ts index c3bce1742..8839332a8 100644 --- a/data/wagmi.ts +++ b/data/wagmi.ts @@ -1,3 +1,4 @@ +import { fallback, http } from "@wagmi/core"; import { zkSync, type Chain, zkSyncSepoliaTestnet, zkSyncTestnet } from "@wagmi/core/chains"; import { defaultWagmiConfig } from "@web3modal/wagmi"; @@ -47,8 +48,12 @@ const getAllChains = () => { return chains; }; +const chains = getAllChains(); export const wagmiConfig = defaultWagmiConfig({ chains: getAllChains() as any, + transports: Object.fromEntries( + chains.map((chain) => [chain.id, fallback(chain.rpcUrls.default.http.map((e) => http(e)))]) + ), projectId: process.env.WALLET_CONNECT_PROJECT_ID, metadata, enableCoinbase: false,