diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-10-26 04:04:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-26 04:04:31 +0800 |
commit | e78398862b5e7bb08d15590c9bd0c656994b2a1f (patch) | |
tree | d1a719dd67857d2555369d9b377518061798b597 /src/utils/assert.ts | |
parent | fa3e88c454e8d25fe8725dc7bf8ea35d6c3e33ab (diff) | |
parent | 122a5e9b63b5b3617ad63a56b0673fd9dd974208 (diff) | |
download | dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.gz dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.bz2 dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.lz dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.xz dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.tar.zst dexon-sol-tools-e78398862b5e7bb08d15590c9bd0c656994b2a1f.zip |
Merge pull request #202 from 0xProject/fix/bignumber-types
Bignumber types
Diffstat (limited to 'src/utils/assert.ts')
-rw-r--r-- | src/utils/assert.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts index 099f4490f..286105345 100644 --- a/src/utils/assert.ts +++ b/src/utils/assert.ts @@ -1,5 +1,5 @@ import * as _ from 'lodash'; -import * as BigNumber from 'bignumber.js'; +import BigNumber from 'bignumber.js'; import * as Web3 from 'web3'; import {Web3Wrapper} from '../web3_wrapper'; import {SchemaValidator, Schema} from '0x-json-schemas'; @@ -7,8 +7,8 @@ import {SchemaValidator, Schema} from '0x-json-schemas'; const HEX_REGEX = /^0x[0-9A-F]*$/i; export const assert = { - isBigNumber(variableName: string, value: BigNumber.BigNumber): void { - const isBigNumber = _.isObject(value) && value.isBigNumber; + isBigNumber(variableName: string, value: BigNumber): void { + const isBigNumber = _.isObject(value) && (value as any).isBigNumber; this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value)); }, isUndefined(value: any, variableName?: string): void { |