aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/assert.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-26 03:22:23 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-10-26 03:22:23 +0800
commit744a9b89312c825ee94195106b9aa8aa11f43b77 (patch)
tree29009ec3e75e9d0396e744993065c05ef04c650b /src/utils/assert.ts
parent45c4042e2bb6d4c13510a5922602ba49bb5108ef (diff)
downloaddexon-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/utils/assert.ts')
-rw-r--r--src/utils/assert.ts6
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 {