From 429aeae6000b217eca58fa6f48f4a580c85d25b7 Mon Sep 17 00:00:00 2001 From: Dhaiwat Pandya Date: Thu, 30 Dec 2021 16:21:33 +0530 Subject: [PATCH] Refactor! Co-authored-by: with-heart --- packages/hooks/src/hooks/useContract.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hooks/src/hooks/useContract.ts b/packages/hooks/src/hooks/useContract.ts index cbcfe996..1c228d70 100644 --- a/packages/hooks/src/hooks/useContract.ts +++ b/packages/hooks/src/hooks/useContract.ts @@ -7,7 +7,7 @@ export function useContract(address: string, abi) { const [contract, setContract] = React.useState({}); const [isReady, setIsReady] = React.useState(false); React.useEffect(() => { - if (context && context.connected) { + if (context?.connected) { const newContract = new Contract( address, abi,