Switch to blockchain with given chain id in the active wallet.
import { useSwitchActiveWalletChain } from "thirdweb/react";import { sepolia } from "thirdweb/chains"; const switchChain = useSwitchActiveWalletChain(); // later in your code<button onClick={() => switchChain(sepolia)}>Switch Chain</button>;
function useSwitchActiveWalletChain(): ( chain: Readonly,) => Promise<void>;
let returnType: (chain: Readonly) => Promise<void>;
A function to switch to blockchain with given chain id in the active wallet.