1
1
"use client" ;
2
- import { PastGames } from "@/components/past-games/past-games" ;
3
2
import { Button } from "@/components/button" ;
4
3
import { Game } from "@/components/game" ;
4
+ import { PastGames } from "@/components/past-games/past-games" ;
5
5
import { fetchLeaderboard , fetchMruInfo } from "@/rpc/api" ;
6
6
import { useEffect , useState } from "react" ;
7
7
import { createWalletClient , custom } from "viem" ;
8
8
import { addChain } from "viem/actions" ;
9
+ import { sepolia } from "viem/chains" ;
9
10
import { useAccount , useConnect } from "wagmi" ;
10
- import { stackrDevnet } from "./config" ;
11
11
12
12
export default function Main ( ) {
13
13
const { isConnected, isConnecting } = useAccount ( ) ;
@@ -32,12 +32,12 @@ export default function Main() {
32
32
const walletClient = createWalletClient ( {
33
33
transport : custom ( window . ethereum ) ,
34
34
} ) ;
35
- if ( chainId !== stackrDevnet . id ) {
35
+ if ( chainId !== sepolia . id ) {
36
36
try {
37
- await walletClient . switchChain ( { id : stackrDevnet . id } ) ;
37
+ await walletClient . switchChain ( { id : sepolia . id } ) ;
38
38
} catch ( e ) {
39
39
console . log ( e ) ;
40
- await addChain ( walletClient , { chain : stackrDevnet } ) ;
40
+ await addChain ( walletClient , { chain : sepolia } ) ;
41
41
}
42
42
}
43
43
connect ( { connector } ) ;
0 commit comments