diff --git a/src/logic/wallets/getWeb3.js b/src/logic/wallets/getWeb3.js index f5aea1fb..073b6106 100644 --- a/src/logic/wallets/getWeb3.js +++ b/src/logic/wallets/getWeb3.js @@ -91,10 +91,11 @@ export const getProviderInfo: Function = async (): Promise => { } export const getBalanceInEtherOf = async (safeAddress: string) => { - const funds: BigNumber = await web3.eth.getBalance(safeAddress) - if (!funds || funds === '0') { + const funds: String = await web3.eth.getBalance(safeAddress) + + if (!funds) { return '0' } - return web3.fromWei(funds.toNumber(), 'ether').toString() + return web3.utils.fromWei(funds, 'ether').toString() } diff --git a/src/utils/clipboard.js b/src/utils/clipboard.js index 4f91c494..d8ad191f 100644 --- a/src/utils/clipboard.js +++ b/src/utils/clipboard.js @@ -10,4 +10,4 @@ export const copyToClipboard = (text: string) => { } catch (err) { console.error(err.message) } -} \ No newline at end of file +}