diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts index e62bff866..d814b230c 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts @@ -26,7 +26,7 @@ export const useScaffoldContract = < walletClient?: TWalletClient | null; chainId?: AllowedChainIds; }) => { - const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds); + const selectedNetwork = useSelectedNetwork(chainId); const { data: deployedContractData, isLoading: deployedContractLoading } = useDeployedContractInfo({ contractName, chainId: selectedNetwork?.id as AllowedChainIds, diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts index 5cd679a09..c2bdd46ee 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts @@ -84,7 +84,7 @@ export const useScaffoldEventHistory = < watch, enabled = true, }: UseScaffoldEventHistoryConfig) => { - const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds); + const selectedNetwork = useSelectedNetwork(chainId); const publicClient = usePublicClient({ chainId: selectedNetwork.id, diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldReadContract.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldReadContract.ts index 19e3adbf7..82dfe3dc9 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldReadContract.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldReadContract.ts @@ -32,7 +32,7 @@ export const useScaffoldReadContract = < chainId, ...readConfig }: UseScaffoldReadConfig) => { - const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds); + const selectedNetwork = useSelectedNetwork(chainId); const { data: deployedContract } = useDeployedContractInfo({ contractName, chainId: selectedNetwork.id as AllowedChainIds, diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldWatchContractEvent.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldWatchContractEvent.ts index 2fb51fd15..26878a5ce 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldWatchContractEvent.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldWatchContractEvent.ts @@ -24,7 +24,7 @@ export const useScaffoldWatchContractEvent = < chainId, onLogs, }: UseScaffoldEventConfig) => { - const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds); + const selectedNetwork = useSelectedNetwork(chainId); const { data: deployedContractData } = useDeployedContractInfo({ contractName, chainId: selectedNetwork.id as AllowedChainIds, diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts index f5bc9badc..73e33543a 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts @@ -33,7 +33,7 @@ export const useScaffoldWriteContract = ({ const wagmiContractWrite = useWriteContract(writeContractParams); - const selectedNetwork = useSelectedNetwork(chainId as AllowedChainIds); + const selectedNetwork = useSelectedNetwork(chainId); const { data: deployedContractData } = useDeployedContractInfo({ contractName,