diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-05 02:03:01 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-05 02:03:01 +0800 |
commit | c9bfb86960d3c57c8cdefb4d044036028bfb47ed (patch) | |
tree | 52e6e2185c7a03338930111661b32d75aeea29cb /packages/web3-wrapper/src | |
parent | d0b2b4d0aa8b67c6f867f83c9b35b8e49c57b4a1 (diff) | |
parent | 3991e66a58f28dbed5e75f74ef4aaaf6bb3a4d3e (diff) | |
download | dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar.gz dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar.bz2 dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar.lz dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar.xz dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.tar.zst dexon-sol-tools-c9bfb86960d3c57c8cdefb4d044036028bfb47ed.zip |
merge base branch
Diffstat (limited to 'packages/web3-wrapper/src')
-rw-r--r-- | packages/web3-wrapper/src/utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts index 01605dc9a..0b568aac5 100644 --- a/packages/web3-wrapper/src/utils.ts +++ b/packages/web3-wrapper/src/utils.ts @@ -37,7 +37,7 @@ export const utils = { const hexBase = 16; const valueHex = valueBigNumber.toString(hexBase); - return valueBigNumber.lessThan(0) ? '-0x' + valueHex.substr(1) : '0x' + valueHex; + return valueBigNumber.lessThan(0) ? `-0x${valueHex.substr(1)}` : `0x${valueHex}`; }, numberToHex(value: number): string { if (!isFinite(value) && !utils.isHexStrict(value)) { @@ -48,7 +48,7 @@ export const utils = { const hexBase = 16; const result = valueBigNumber.toString(hexBase); - return valueBigNumber.lt(0) ? '-0x' + result.substr(1) : '0x' + result; + return valueBigNumber.lt(0) ? `-0x${result.substr(1)}` : `0x${result}`; }, isHexStrict(hex: string | number): boolean { return ( |