aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/utils/test/lib_bytes.ts
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-12-11 02:29:17 +0800
committerGitHub <noreply@github.com>2018-12-11 02:29:17 +0800
commit6c86cc8ab87ae6f8d435546ec80161faee7bce74 (patch)
treedcdf1233e5f86070b24b751c1b7792072360371d /contracts/utils/test/lib_bytes.ts
parent8d93413a5d49bcafe4b5d0dee359cc09afce7222 (diff)
parentf14603ca4d91ca72d9e81de53168230d85bc50aa (diff)
downloaddexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.gz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.bz2
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.lz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.xz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.zst
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.zip
Merge pull request #1405 from 0xProject/tslint-changes
Implement prefer-template tslint rule
Diffstat (limited to 'contracts/utils/test/lib_bytes.ts')
-rw-r--r--contracts/utils/test/lib_bytes.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/contracts/utils/test/lib_bytes.ts b/contracts/utils/test/lib_bytes.ts
index 985a98943..6fb859c67 100644
--- a/contracts/utils/test/lib_bytes.ts
+++ b/contracts/utils/test/lib_bytes.ts
@@ -25,7 +25,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
// BUG: Ideally we would use Buffer.from(memory).toString('hex')
// https://github.com/Microsoft/TypeScript/issues/23155
-const toHex = (buf: Uint8Array): string => buf.reduce((a, v) => a + ('00' + v.toString(16)).slice(-2), '0x');
+const toHex = (buf: Uint8Array): string => buf.reduce((a, v) => a + `00${v.toString(16)}`.slice(-2), '0x');
const fromHex = (str: string): Uint8Array => Uint8Array.from(Buffer.from(str.slice(2), 'hex'));