From ab28b1d67c1fa2a581245ab5443d6c4f63cb58ed Mon Sep 17 00:00:00 2001 From: Shiv Bhonde Date: Tue, 24 Oct 2023 17:11:30 +0530 Subject: [PATCH] remove chainId from useContractWrite --- .../components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx | 1 - packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx b/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx index d96a3c75f..5d2e9e24f 100644 --- a/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx +++ b/packages/nextjs/components/scaffold-eth/Contract/WriteOnlyFunctionForm.tsx @@ -32,7 +32,6 @@ export const WriteOnlyFunctionForm = ({ abiFunction, onChange, contractAddress } isLoading, writeAsync, } = useContractWrite({ - chainId: getTargetNetwork().id, address: contractAddress, functionName: abiFunction.name, abi: [abiFunction] as Abi, diff --git a/packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts b/packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts index 773922080..7efe10fbb 100644 --- a/packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts +++ b/packages/nextjs/hooks/scaffold-eth/useScaffoldContractWrite.ts @@ -35,7 +35,6 @@ export const useScaffoldContractWrite = < const configuredNetwork = getTargetNetwork(); const wagmiContractWrite = useContractWrite({ - chainId: configuredNetwork.id, address: deployedContractData?.address, abi: deployedContractData?.abi as Abi, functionName: functionName as any,