diff --git a/packages/contracts/src/useRegisteredContract.tsx b/packages/contracts/src/useRegisteredContract.tsx index 24a84be..23a79aa 100644 --- a/packages/contracts/src/useRegisteredContract.tsx +++ b/packages/contracts/src/useRegisteredContract.tsx @@ -81,7 +81,10 @@ export const useWrappedContract = ( ) useEffect(() => { - if (!deploymentInfo) return + if (!deploymentInfo) { + setwWrappedContract(undefined) + return + } const newWrappedContract: WrappedContract = { deploymentInfo,