From 85a956a8f2b9600b11342efbc077fb244806f390 Mon Sep 17 00:00:00 2001 From: Norbi <37236152+KatunaNorbert@users.noreply.github.com> Date: Thu, 15 Apr 2021 13:43:12 +0300 Subject: [PATCH] fix Graph sync status randomly failing (#522) Co-authored-by: Norbi --- src/providers/Web3.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/providers/Web3.tsx b/src/providers/Web3.tsx index a4364e60b..695212fab 100644 --- a/src/providers/Web3.tsx +++ b/src/providers/Web3.tsx @@ -112,11 +112,13 @@ function Web3Provider({ children }: { children: ReactNode }): ReactElement { const [block, setBlock] = useState() const [isTestnet, setIsTestnet] = useState() const [accountId, setAccountId] = useState() - const [web3Loading, setWeb3Loading] = useState() + const [web3Loading, setWeb3Loading] = useState(true) const connect = useCallback(async () => { - if (!web3Modal) return - + if (!web3Modal) { + setWeb3Loading(false) + return + } try { setWeb3Loading(true) Logger.log('[web3] Connecting Web3...')