diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-18 20:06:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 20:06:08 +0800 |
commit | 3973dec9944a10c62ec6c3d15d973a00a6ea45a6 (patch) | |
tree | 73f1528a36b8fc8a0778e164b1579eb5865d944a /packages/base-contract/src/index.ts | |
parent | bef30e4209b26c8d4f443f8672e9acb9471c6a37 (diff) | |
parent | c8212f1d4d255120e5e683664b86f1830fb45ae6 (diff) | |
download | dexon-0x-contracts-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.gz dexon-0x-contracts-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.zst dexon-0x-contracts-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.zip |
Merge pull request #1517 from 0xProject/feature/bignumber-8.0
Bignumber 8.0
Diffstat (limited to 'packages/base-contract/src/index.ts')
-rw-r--r-- | packages/base-contract/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index c2b7b943b..0238106f3 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -1,4 +1,4 @@ -import { AbiEncoder, abiUtils } from '@0x/utils'; +import { AbiEncoder, abiUtils, BigNumber } from '@0x/utils'; import { Web3Wrapper } from '@0x/web3-wrapper'; import { AbiDefinition, @@ -43,7 +43,7 @@ export class BaseContract { return type === 'address' ? value.toLowerCase() : value; } protected static _bigNumberToString(_type: string, value: any): any { - return _.isObject(value) && value.isBigNumber ? value.toString() : value; + return BigNumber.isBigNumber(value) ? value.toString() : value; } protected static _lookupConstructorAbi(abi: ContractAbi): ConstructorAbi { const constructorAbiIfExists = _.find( |