diff options
author | Leonid <logvinov.leon@gmail.com> | 2017-12-19 19:10:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-19 19:10:59 +0800 |
commit | 04268d7f4b4a8a3496518a450bfcf01bb056a57e (patch) | |
tree | 089c743f946ff175838b4ee3142d5ead1aecdc0c /packages/0x.js/src/utils | |
parent | c63f76dde7267c54328d2f12f401d94484e5a91a (diff) | |
parent | 156dae1d33bd0a19c764262fbf0c9d6743425fc6 (diff) | |
download | dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.gz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.bz2 dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.lz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.xz dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.zst dexon-sol-tools-04268d7f4b4a8a3496518a450bfcf01bb056a57e.zip |
Merge pull request #272 from 0xProject/fix/subscription-opts
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r-- | packages/0x.js/src/utils/filter_utils.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/0x.js/src/utils/filter_utils.ts b/packages/0x.js/src/utils/filter_utils.ts index 57c3ee71c..65161c33e 100644 --- a/packages/0x.js/src/utils/filter_utils.ts +++ b/packages/0x.js/src/utils/filter_utils.ts @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import * as uuid from 'uuid/v4'; import * as Web3 from 'web3'; -import {ContractEvents, IndexedFilterValues, SubscriptionOpts} from '../types'; +import {BlockRange, ContractEvents, IndexedFilterValues} from '../types'; const TOPIC_LENGTH = 32; @@ -14,7 +14,7 @@ export const filterUtils = { }, getFilter(address: string, eventName: ContractEvents, indexFilterValues: IndexedFilterValues, abi: Web3.ContractAbi, - subscriptionOpts?: SubscriptionOpts): Web3.FilterObject { + blockRange?: BlockRange): Web3.FilterObject { const eventAbi = _.find(abi, {name: eventName}) as Web3.EventAbi; const eventSignature = filterUtils.getEventSignatureFromAbiByName(eventAbi, eventName); const topicForEventSignature = ethUtil.addHexPrefix(jsSHA3.keccak256(eventSignature)); @@ -24,9 +24,9 @@ export const filterUtils = { address, topics, }; - if (!_.isUndefined(subscriptionOpts)) { + if (!_.isUndefined(blockRange)) { filter = { - ...subscriptionOpts, + ...blockRange, ...filter, }; } |