Docs

useActiveWalletChain

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

Example

import { useActiveWalletChain } from "thirdweb/react";
const activeChain = useActiveWalletChain();

Returns

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