diff --git a/hooks/contractHooks.ts b/hooks/contractHooks.ts index 81ec0b3..950b3cb 100644 --- a/hooks/contractHooks.ts +++ b/hooks/contractHooks.ts @@ -33,14 +33,14 @@ export const useContractLoader = < const contract = useMemo( () => attachContract(factory, address, web3Provider) || undefined, - [factory, address, web3Provider], + [address, web3Provider], ); const [values, setValues] = useState>(); useEffect(() => { // noinspection JSIgnoredPromiseFromCall fetchValues(); - }, [address]); + }, [contract]); const fetchValues = async () => { if (!contract) { @@ -77,7 +77,7 @@ export const useInterfaceLoader = { // noinspection JSIgnoredPromiseFromCall fetchValues(); - }, [address]); + }, [contract]); const fetchValues = async () => { if (!contract) {