diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 18:32:53 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 23:25:25 +0800 |
commit | e84232cce8b1a1b1e3607d341baa688613dcefde (patch) | |
tree | 848fda704174e8d559be41021110c6c2c7b03b0d /packages/web3-wrapper/src | |
parent | de78d6a8ad6104a044e5b56251c47a41b63bf013 (diff) | |
download | dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.gz dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.bz2 dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.lz dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.xz dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.tar.zst dexon-sol-tools-e84232cce8b1a1b1e3607d341baa688613dcefde.zip |
Use new check for isBigNumber
Diffstat (limited to 'packages/web3-wrapper/src')
-rw-r--r-- | packages/web3-wrapper/src/utils.ts | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts index 1b67518b1..1aba3c75a 100644 --- a/packages/web3-wrapper/src/utils.ts +++ b/packages/web3-wrapper/src/utils.ts @@ -2,10 +2,6 @@ import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; export const utils = { - isBigNumber(value: any): boolean { - const isBigNumber = _.isObject(value) && value.isBigNumber; - return isBigNumber; - }, convertHexToNumber(value: string): number { const valueBigNumber = new BigNumber(value); const valueNumber = valueBigNumber.toNumber(); @@ -20,7 +16,7 @@ export const utils = { }, convertAmountToBigNumber(value: string | number | BigNumber): BigNumber { const num = value || 0; - const isBigNumber = utils.isBigNumber(num); + const isBigNumber = BigNumber.isBigNumber(num); if (isBigNumber) { return num as BigNumber; } |