aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-10-04 19:22:47 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-10-04 19:22:47 +0800
commitcc3871aca54a9c4dc0906e2b726c2c079787f142 (patch)
treea3da1b2866cb3af337b92dfa104d460ef4b7fd9d /src/contract_wrappers
parent8fb5e8724310d034659be6d00d287bb73ced1eae (diff)
downloaddexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar.gz
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar.bz2
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar.lz
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar.xz
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.tar.zst
dexon-sol-tools-cc3871aca54a9c4dc0906e2b726c2c079787f142.zip
Use find
Diffstat (limited to 'src/contract_wrappers')
-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);