From 499e60c4a3719ce0699f75f1993a5336d0074bc7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 4 Oct 2017 12:48:45 +0300 Subject: Use 0x.length instead of 2 --- src/utils/abi_decoder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/abi_decoder.ts b/src/utils/abi_decoder.ts index b601dd2f4..4646016f2 100644 --- a/src/utils/abi_decoder.ts +++ b/src/utils/abi_decoder.ts @@ -24,7 +24,7 @@ export class AbiDecoder { const nonIndexedInputs = _.filter(event.inputs, input => !input.indexed); const dataTypes = _.map(nonIndexedInputs, input => input.type); - const decodedData = SolidityCoder.decodeParams(dataTypes, logData.slice(2)); + const decodedData = SolidityCoder.decodeParams(dataTypes, logData.slice('0x'.length)); _.map(event.inputs, (param: Web3.EventParameter) => { let value; -- cgit v1.2.3