aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers/contract_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/contract_wrappers/contract_wrapper.ts')
-rw-r--r--src/contract_wrappers/contract_wrapper.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts
index cffd2f6f3..6f074a976 100644
--- a/src/contract_wrappers/contract_wrapper.ts
+++ b/src/contract_wrappers/contract_wrapper.ts
@@ -24,7 +24,7 @@ export class ContractWrapper {
indexFilterValues: IndexedFilterValues,
abi: Web3.ContractAbi): Promise<LogWithDecodedArgs[]> {
// TODO include indexFilterValues in topics
- const eventAbi = _.filter(abi, {name: eventName})[0] as Web3.EventAbi;
+ const eventAbi = _.find(abi, {name: eventName}) as Web3.EventAbi;
const eventSignature = this._getEventSignatureFromAbiByName(eventAbi, eventName);
const topicForEventSignature = this._web3Wrapper.keccak256(eventSignature);
const topics = [topicForEventSignature];