diff options
Diffstat (limited to 'packages/web3-wrapper/src/utils.ts')
-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 ( |