aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web3-wrapper/src/utils.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-10-02 21:29:49 +0800
committerGitHub <noreply@github.com>2018-10-02 21:29:49 +0800
commitf1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4 (patch)
tree33252be8be47a0b9da43b9ad5ead30baa992e5f3 /packages/web3-wrapper/src/utils.ts
parent9ad4a135d23f485b705d3d9fb3f93be6c958c6b9 (diff)
parenta4153144dbd2a46d51069e57ba7c1402e5867154 (diff)
downloaddexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar.gz
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar.bz2
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar.lz
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar.xz
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.tar.zst
dexon-sol-tools-f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4.zip
Merge pull request #1104 from 0xProject/feature/bundlesize
Bundle size reporting
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 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 (