Skip to content

Commit

Permalink
Update useDeployedContractInfo.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed Dec 10, 2024
1 parent 864971e commit 44ded30
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { useEffect, useState } from "react";
import { useIsMounted } from "usehooks-ts";
import { usePublicClient } from "wagmi";
import { useSelectedNetwork } from "~~/hooks/scaffold-eth";
import { AllowedChainIds } from "~~/utils/scaffold-eth";
import {
Contract,
ContractCodeStatus,
Expand All @@ -21,7 +20,7 @@ export const useDeployedContractInfo = <TContractName extends ContractName>({
}: UseDeployedContractConfig<TContractName>) => {
const isMounted = useIsMounted();

const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds);
const selectedNetwork = useSelectedNetwork(chainId);
const deployedContract = contracts?.[selectedNetwork.id]?.[contractName as ContractName] as Contract<TContractName>;
const [status, setStatus] = useState<ContractCodeStatus>(ContractCodeStatus.LOADING);
const publicClient = usePublicClient({ chainId: selectedNetwork.id });
Expand Down

0 comments on commit 44ded30

Please sign in to comment.