aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 7732f2f50..4d08f04e6 100644
--- a/src/contract_wrappers/contract_wrapper.ts
+++ b/src/contract_wrappers/contract_wrapper.ts
@@ -26,7 +26,7 @@ export class ContractWrapper {
protected async _getLogsAsync(address: string, eventName: ContractEvents, subscriptionOpts: SubscriptionOpts,
indexFilterValues: IndexedFilterValues,
abi: Web3.ContractAbi): Promise<LogWithDecodedArgs[]> {
- 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 topicsForIndexedArgs = this._getTopicsForIndexedArgs(eventAbi, indexFilterValues);