From e59c57106cd15d45efb6f4100529cf6e5dfe71a8 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 25 Jun 2018 09:44:56 -0700 Subject: Run prettier --- packages/utils/src/abi_decoder.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'packages/utils') diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 390423644..d0c1ddc7d 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -34,17 +34,17 @@ export class AbiDecoder { let decodedData: any[]; try { - decodedData = ethersInterface.events[event.name].parse(log.data); + decodedData = ethersInterface.events[event.name].parse(log.data); } catch (error) { - if (error.code === ethers.errors.INVALID_ARGUMENT) { - // Because we index events by Method ID, and Method IDs are derived from the method - // name and the input parameters, it's possible that the return value of the event - // does not match our ABI. If that's the case, then ethers will throw an error - // when we try to parse the event. We handle that case here by returning the log rather - // than throwing an error. - return log; - } - throw error; + if (error.code === ethers.errors.INVALID_ARGUMENT) { + // Because we index events by Method ID, and Method IDs are derived from the method + // name and the input parameters, it's possible that the return value of the event + // does not match our ABI. If that's the case, then ethers will throw an error + // when we try to parse the event. We handle that case here by returning the log rather + // than throwing an error. + return log; + } + throw error; } let didFailToDecode = false; -- cgit v1.2.3