useActiveWalletChain

A hook that returns the chain the active wallet is connected to

Example

import { useActiveWalletChain } from "thirdweb/react";
const activeChain = useActiveWalletChain();
function useActiveWalletChain():
| undefined
| Readonly<ChainOptions & { rpc: string }>;

Returns

let returnType: undefined | Readonly<ChainOptions & { rpc: string }>;

The chain the active wallet is connected to or null if no active wallet.