aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper/src/utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-18 20:54:47 +0800
committerGitHub <noreply@github.com>2018-07-18 20:54:47 +0800
commitf3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0 (patch)
tree4aacfa2652ba2c5f976e36ac25449decb561d3f0 /packages/web3-wrapper/src/utils.ts
parent904968cf4a899642d3f4e78abc53352125e17447 (diff)
parentbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (diff)
downloaddexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.gz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.bz2
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.lz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.xz
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.tar.zst
dexon-sol-tools-f3241ff86a0d99f4291c5a5f4eaaa5ebe1736da0.zip
Merge pull request #883 from 0xProject/feature/tslint-improvements
New tslint rules
Diffstat (limited to 'packages/web3-wrapper/src/utils.ts')
-rw-r--r--packages/web3-wrapper/src/utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts
index d13eb9404..01605dc9a 100644
--- a/packages/web3-wrapper/src/utils.ts
+++ b/packages/web3-wrapper/src/utils.ts
@@ -15,7 +15,7 @@ export const utils = {
if (_.isNull(hex)) {
return null;
}
- const decimal = this.convertHexToNumber(hex);
+ const decimal = utils.convertHexToNumber(hex);
return decimal;
},
convertAmountToBigNumber(value: string | number | BigNumber): BigNumber {
@@ -40,7 +40,7 @@ export const utils = {
return valueBigNumber.lessThan(0) ? '-0x' + valueHex.substr(1) : '0x' + valueHex;
},
numberToHex(value: number): string {
- if (!isFinite(value) && !this.isHexStrict(value)) {
+ if (!isFinite(value) && !utils.isHexStrict(value)) {
throw new Error(`Given input ${value} is not a number.`);
}