diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-04 16:53:44 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-10-04 16:53:44 +0800 |
commit | aa995ff9941c4f319985e23a14d0a87fc7b9ea1c (patch) | |
tree | 33ec31653aff1139216ddfa7868e48f7e8ffe97e /src/contract_wrappers | |
parent | d1e4f6efdd14dc3b7c73b1d95f360cedaf4df03b (diff) | |
download | dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar.gz dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar.bz2 dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar.lz dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar.xz dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.tar.zst dexon-sol-tools-aa995ff9941c4f319985e23a14d0a87fc7b9ea1c.zip |
Use _.find instead of _.filter
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/contract_wrapper.ts | 2 |
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]; |