aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/utils
diff options
context:
space:
mode:
authorkao <zichongkao@gmail.com>2018-12-08 08:35:00 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 01:19:31 +0800
commit93422eab55f674ed33168a4731884e54d5a9ca78 (patch)
treea3829d1abdfd07171319db5454d9a4336fc62888 /contracts/utils
parent74e07b63de9688aa0dca2ce69863203766db6008 (diff)
downloaddexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.gz
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.bz2
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.lz
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.xz
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.tar.zst
dexon-sol-tools-93422eab55f674ed33168a4731884e54d5a9ca78.zip
Implement prefer-template tslint rule
Diffstat (limited to 'contracts/utils')
-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'));