Skip to content

Commit 5263fc9

Browse files
committed
feat: added polygon mainnet for production
1 parent e83c164 commit 5263fc9

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/pages/_app.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import {
2525

2626
// SIWE Integration
2727
import { WagmiConfig, createConfig, configureChains } from "wagmi";
28-
import { polygonMumbai } from "wagmi/chains";
28+
import { polygon, polygonMumbai } from "wagmi/chains";
2929
import { publicProvider } from "wagmi/providers/public";
3030
import { ChakraProvider } from "@chakra-ui/react";
3131
import { theme } from "@/theme";
@@ -38,8 +38,15 @@ import { AppContextProvider } from "@/contexts/AppContextProvider";
3838
/**
3939
* Configure chains supported
4040
*/
41+
42+
const CURRENT_CHAIN =
43+
process.env.VERCEL_ENV !== undefined &&
44+
process.env.VERCEL_ENV === "production"
45+
? polygon
46+
: polygonMumbai;
47+
4148
const { chains, publicClient } = configureChains(
42-
[polygonMumbai],
49+
[CURRENT_CHAIN],
4350
[publicProvider()],
4451
);
4552

0 commit comments

Comments
 (0)