11"use client" ;
2- import { PastGames } from "@/components/past-games/past-games" ;
32import { Button } from "@/components/button" ;
43import { Game } from "@/components/game" ;
4+ import { PastGames } from "@/components/past-games/past-games" ;
55import { fetchLeaderboard , fetchMruInfo } from "@/rpc/api" ;
66import { useEffect , useState } from "react" ;
77import { createWalletClient , custom } from "viem" ;
88import { addChain } from "viem/actions" ;
9+ import { sepolia } from "viem/chains" ;
910import { useAccount , useConnect } from "wagmi" ;
10- import { stackrDevnet } from "./config" ;
1111
1212export default function Main ( ) {
1313 const { isConnected, isConnecting } = useAccount ( ) ;
@@ -32,12 +32,12 @@ export default function Main() {
3232 const walletClient = createWalletClient ( {
3333 transport : custom ( window . ethereum ) ,
3434 } ) ;
35- if ( chainId !== stackrDevnet . id ) {
35+ if ( chainId !== sepolia . id ) {
3636 try {
37- await walletClient . switchChain ( { id : stackrDevnet . id } ) ;
37+ await walletClient . switchChain ( { id : sepolia . id } ) ;
3838 } catch ( e ) {
3939 console . log ( e ) ;
40- await addChain ( walletClient , { chain : stackrDevnet } ) ;
40+ await addChain ( walletClient , { chain : sepolia } ) ;
4141 }
4242 }
4343 connect ( { connector } ) ;
0 commit comments