Re-wrap BigNumber returned from web3 in getBalanceInEthAsync
This commit is contained in:
@@ -36,7 +36,8 @@ export class Web3Wrapper {
|
||||
}
|
||||
public async getBalanceInEthAsync(owner: string): Promise<BigNumber.BigNumber> {
|
||||
const balanceInWei = await promisify(this.web3.eth.getBalance)(owner);
|
||||
const balanceEth = this.web3.fromWei(balanceInWei, 'ether');
|
||||
let balanceEth = this.web3.fromWei(balanceInWei, 'ether');
|
||||
balanceEth = new BigNumber(balanceEth);
|
||||
return balanceEth;
|
||||
}
|
||||
public async doesContractExistAtAddressAsync(address: string): Promise<boolean> {
|
||||
|
Reference in New Issue
Block a user