aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBryce <brycedneal@gmail.com>2018-06-26 00:44:56 +0800
committerBryce <brycedneal@gmail.com>2018-06-26 00:44:56 +0800
commite59c57106cd15d45efb6f4100529cf6e5dfe71a8 (patch)
tree74a2a06977b6d9cf44b25f69f2c6eb0294e19a43 /packages
parent4b2d27b5e54631d24117e330914e8631e8bb5253 (diff)
downloaddexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar.gz
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar.bz2
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar.lz
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar.xz
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.tar.zst
dexon-sol-tools-e59c57106cd15d45efb6f4100529cf6e5dfe71a8.zip
Run prettier
Diffstat (limited to 'packages')
-rw-r--r--packages/typescript-typings/types/ethers/index.d.ts2
-rw-r--r--packages/utils/src/abi_decoder.ts20
2 files changed, 11 insertions, 11 deletions
diff --git a/packages/typescript-typings/types/ethers/index.d.ts b/packages/typescript-typings/types/ethers/index.d.ts
index c3ec82163..f869196e0 100644
--- a/packages/typescript-typings/types/ethers/index.d.ts
+++ b/packages/typescript-typings/types/ethers/index.d.ts
@@ -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',
}
}
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;