File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ import {
25
25
26
26
// SIWE Integration
27
27
import { WagmiConfig , createConfig , configureChains } from "wagmi" ;
28
- import { polygonMumbai } from "wagmi/chains" ;
28
+ import { polygon , polygonMumbai } from "wagmi/chains" ;
29
29
import { publicProvider } from "wagmi/providers/public" ;
30
30
import { ChakraProvider } from "@chakra-ui/react" ;
31
31
import { theme } from "@/theme" ;
@@ -38,8 +38,15 @@ import { AppContextProvider } from "@/contexts/AppContextProvider";
38
38
/**
39
39
* Configure chains supported
40
40
*/
41
+
42
+ const CURRENT_CHAIN =
43
+ process . env . VERCEL_ENV !== undefined &&
44
+ process . env . VERCEL_ENV === "production"
45
+ ? polygon
46
+ : polygonMumbai ;
47
+
41
48
const { chains, publicClient } = configureChains (
42
- [ polygonMumbai ] ,
49
+ [ CURRENT_CHAIN ] ,
43
50
[ publicProvider ( ) ] ,
44
51
) ;
45
52
You can’t perform that action at this time.
0 commit comments