Skip to content

Commit c7c0f51

Browse files
authored
Merge pull request #254 from Markkos89/staging
feat: adding polygon mainnet
2 parents 5b2ade7 + 2cc5dad commit c7c0f51

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
@@ -26,7 +26,7 @@ import {
2626

2727
// SIWE Integration
2828
import { WagmiConfig, createConfig, configureChains } from "wagmi";
29-
import { polygonMumbai } from "wagmi/chains";
29+
import { polygon, polygonMumbai } from "wagmi/chains";
3030
import { publicProvider } from "wagmi/providers/public";
3131
import { ChakraProvider } from "@chakra-ui/react";
3232
import { theme } from "@/theme";
@@ -39,8 +39,15 @@ import { AppContextProvider } from "@/contexts/AppContextProvider";
3939
/**
4040
* Configure chains supported
4141
*/
42+
43+
const CURRENT_CHAIN =
44+
process.env.VERCEL_ENV !== undefined &&
45+
process.env.VERCEL_ENV === "production"
46+
? polygon
47+
: polygonMumbai;
48+
4249
const { chains, publicClient } = configureChains(
43-
[polygonMumbai],
50+
[CURRENT_CHAIN],
4451
[publicProvider()],
4552
);
4653

0 commit comments

Comments
 (0)