import { useNetwork } from "wagmi";

const useActiveChainId = () => {
  const { chain } = useNetwork();
  const chainId = chain?.id;

  return {
    chainId,
    isWrongNetwork: chain?.unsupported ?? false,
  };
};

export default useActiveChainId;
