1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

reactivate user balance check

This commit is contained in:
Matthias Kretschmann 2022-01-11 23:19:38 +00:00
parent 245a604a99
commit af99d3bc37
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -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)