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 @@ -26,7 +26,7 @@ import {
26
26
27
27
// SIWE Integration
28
28
import { WagmiConfig , createConfig , configureChains } from "wagmi" ;
29
- import { polygonMumbai } from "wagmi/chains" ;
29
+ import { polygon , polygonMumbai } from "wagmi/chains" ;
30
30
import { publicProvider } from "wagmi/providers/public" ;
31
31
import { ChakraProvider } from "@chakra-ui/react" ;
32
32
import { theme } from "@/theme" ;
@@ -39,8 +39,15 @@ import { AppContextProvider } from "@/contexts/AppContextProvider";
39
39
/**
40
40
* Configure chains supported
41
41
*/
42
+
43
+ const CURRENT_CHAIN =
44
+ process . env . VERCEL_ENV !== undefined &&
45
+ process . env . VERCEL_ENV === "production"
46
+ ? polygon
47
+ : polygonMumbai ;
48
+
42
49
const { chains, publicClient } = configureChains (
43
- [ polygonMumbai ] ,
50
+ [ CURRENT_CHAIN ] ,
44
51
[ publicProvider ( ) ] ,
45
52
) ;
46
53
You can’t perform that action at this time.
0 commit comments