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:
parent
245a604a99
commit
af99d3bc37
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user