aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-10 05:30:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-10 05:30:40 +0800
commit6aa91d89e0fd02601f7e4df86e8499edc00316ce (patch)
tree18ce9ec7e9ab6e2c732c301572379ce24f252936 /src/utils
parentecc54b07c70c9f191a0eb0dece8137f088250a41 (diff)
downloaddexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar.gz
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar.bz2
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar.lz
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar.xz
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.tar.zst
dexon-sol-tools-6aa91d89e0fd02601f7e4df86e8499edc00316ce.zip
Remove redundant assertions
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/assert.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index 48aed6ad3..667b41b7b 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -12,6 +12,7 @@ export const assert = {
this.assert(isBigNumber, this.typeAssertionMessage(variableName, 'BigNumber', value));
},
isValidBaseUnitAmount(variableName: string, value: BigNumber) {
+ assert.isBigNumber(variableName, value);
const hasDecimals = value.decimalPlaces() !== 0;
this.assert(
!hasDecimals, `${variableName} should be in baseUnits (no decimals), found value: ${value.toNumber()}`,