From af99d3bc374fba4e26c54a2ee3e559aa25dca775 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 11 Jan 2022 23:19:38 +0000 Subject: [PATCH] reactivate user balance check --- src/@context/Web3.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/@context/Web3.tsx b/src/@context/Web3.tsx index 9b3e1de6c..e1d432315 100644 --- a/src/@context/Web3.tsx +++ b/src/@context/Web3.tsx @@ -149,11 +149,11 @@ function Web3Provider({ children }: { children: ReactNode }): ReactElement { if (!accountId || !networkId || !web3) return try { - // const balance = { - // eth: web3.utils.fromWei(await web3.eth.getBalance(accountId, 'latest')), - // ocean: await getOceanBalance(accountId, networkId, web3) - // } - // setBalance(balance) + const balance = { + eth: web3.utils.fromWei(await web3.eth.getBalance(accountId, 'latest')), + ocean: await getOceanBalance(accountId, networkId, web3) + } + setBalance(balance) LoggerInstance.log('[web3] Balance: ', balance) } catch (error) { LoggerInstance.error('[web3] Error: ', error.message)