aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-18 22:35:23 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-19 19:10:43 +0800
commit1e4fdcf615502478cbec8711bf6710e093c0c279 (patch)
treec31e798244f261bba623235baaf2873d7df3daf6 /packages/0x.js/src/utils
parentc63f76dde7267c54328d2f12f401d94484e5a91a (diff)
downloaddexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar.gz
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar.bz2
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar.lz
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar.xz
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.tar.zst
dexon-sol-tools-1e4fdcf615502478cbec8711bf6710e093c0c279.zip
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r--packages/0x.js/src/utils/filter_utils.ts8
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,
};
}