From 952ed067ed49f42c466aae6af1ec9530d2823905 Mon Sep 17 00:00:00 2001 From: Ryan Gilbert Date: Tue, 9 Jul 2024 18:16:08 +0200 Subject: [PATCH] chore: add missing networks to wagmi config --- packages/nextjs/services/web3/wagmiConfig.tsx | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/services/web3/wagmiConfig.tsx b/packages/nextjs/services/web3/wagmiConfig.tsx index 73e3b5c..883b0f9 100644 --- a/packages/nextjs/services/web3/wagmiConfig.tsx +++ b/packages/nextjs/services/web3/wagmiConfig.tsx @@ -1,13 +1,37 @@ import { getOrMapViemChain } from "@dynamic-labs/viem-utils"; import { Chain, createClient, http } from "viem"; -import { baseSepolia, hardhat, mainnet } from "viem/chains"; +import { + arbitrum, + arbitrumSepolia, + base, + baseSepolia, + hardhat, + mainnet, + polygon, + polygonAmoy, + scroll, + scrollSepolia, + sepolia, +} from "viem/chains"; import { createConfig } from "wagmi"; import { customEvmNetworks } from "~~/lib/networks"; import scaffoldConfig from "~~/scaffold.config"; import { getAlchemyHttpUrl } from "~~/utils/scaffold-eth"; export const wagmiConfig = createConfig({ - chains: [baseSepolia, mainnet, ...customEvmNetworks.map(getOrMapViemChain)], + chains: [ + arbitrum, + arbitrumSepolia, + base, + baseSepolia, + mainnet, + polygon, + polygonAmoy, + scroll, + scrollSepolia, + sepolia, + ...customEvmNetworks.map(getOrMapViemChain), + ], ssr: true, client({ chain }) { return createClient({