Run prettier

This commit is contained in:
Bryce 2018-06-25 09:44:56 -07:00
parent 4b2d27b5e5
commit e59c57106c
2 changed files with 11 additions and 11 deletions

View File

@ -32,6 +32,6 @@ declare module 'ethers' {
constructor(address: string, abi: any, provider: any);
}
const enum errors {
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
}
}

View File

@ -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;