From f14603ca4d91ca72d9e81de53168230d85bc50aa Mon Sep 17 00:00:00 2001 From: kao Date: Fri, 7 Dec 2018 16:35:00 -0800 Subject: Implement prefer-template tslint rule --- contracts/utils/test/lib_bytes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contracts/utils/test/lib_bytes.ts') 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')); -- cgit v1.2.3