diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-26 03:22:23 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-26 03:22:23 +0800 |
commit | 744a9b89312c825ee94195106b9aa8aa11f43b77 (patch) | |
tree | 29009ec3e75e9d0396e744993065c05ef04c650b /src/web3_wrapper.ts | |
parent | 45c4042e2bb6d4c13510a5922602ba49bb5108ef (diff) | |
download | dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar.gz dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar.bz2 dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar.lz dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar.xz dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.tar.zst dexon-sol-tools-744a9b89312c825ee94195106b9aa8aa11f43b77.zip |
Upgrade bignumber to the version with native typings and remove typings
Diffstat (limited to 'src/web3_wrapper.ts')
-rw-r--r-- | src/web3_wrapper.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/web3_wrapper.ts b/src/web3_wrapper.ts index ff5d25d9c..3b1e4477b 100644 --- a/src/web3_wrapper.ts +++ b/src/web3_wrapper.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; import * as Web3 from 'web3'; -import * as BigNumber from 'bignumber.js'; +import BigNumber from 'bignumber.js'; import promisify = require('es6-promisify'); import {ZeroExError, Artifact} from './types'; import {Contract} from './contract'; @@ -75,11 +75,11 @@ export class Web3Wrapper { ); return contractInstance; } - public toWei(ethAmount: BigNumber.BigNumber): BigNumber.BigNumber { + public toWei(ethAmount: BigNumber): BigNumber { const balanceWei = this.web3.toWei(ethAmount, 'ether'); return balanceWei; } - public async getBalanceInWeiAsync(owner: string): Promise<BigNumber.BigNumber> { + public async getBalanceInWeiAsync(owner: string): Promise<BigNumber> { let balanceInWei = await promisify(this.web3.eth.getBalance)(owner); balanceInWei = new BigNumber(balanceInWei); return balanceInWei; |