diff options
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r-- | src/web3_wrapper.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts index afecbec7f..0a310aeee 100644 --- a/src/web3_wrapper.ts +++ b/src/web3_wrapper.ts @@ -34,6 +34,10 @@ export class Web3Wrapper { return undefined; } } + public toWei(ethAmount: BigNumber.BigNumber): BigNumber.BigNumber { + const balanceWei = this.web3.toWei(ethAmount, 'ether'); + return balanceWei; + } public async getBalanceInEthAsync(owner: string): Promise<BigNumber.BigNumber> { const balanceInWei = await promisify(this.web3.eth.getBalance)(owner); let balanceEth = this.web3.fromWei(balanceInWei, 'ether'); |