From 1e4fdcf615502478cbec8711bf6710e093c0c279 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 18 Dec 2017 15:35:23 +0100 Subject: Rename SubscriptionOpts to BlockRange --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/0x.js/src/contract_wrappers/exchange_wrapper.ts') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 3ca5695c4..7739defc0 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -25,7 +25,7 @@ import { OrderTransactionOpts, OrderValues, SignedOrder, - SubscriptionOpts, + BlockRange, ValidateOrderFillableOpts, } from '../types'; import {AbiDecoder} from '../utils/abi_decoder'; @@ -616,20 +616,20 @@ export class ExchangeWrapper extends ContractWrapper { /** * Gets historical logs without creating a subscription * @param eventName The exchange contract event you would like to subscribe to. - * @param subscriptionOpts Subscriptions options that let you configure the subscription. + * @param blockRange Subscriptions options that let you configure the subscription. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters */ public async getLogsAsync( - eventName: ExchangeEvents, subscriptionOpts: SubscriptionOpts, indexFilterValues: IndexedFilterValues, + eventName: ExchangeEvents, blockRange: BlockRange, indexFilterValues: IndexedFilterValues, ): Promise>> { assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents); - assert.doesConformToSchema('subscriptionOpts', subscriptionOpts, schemas.subscriptionOptsSchema); + assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema); assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema); const exchangeContractAddress = this.getContractAddress(); const logs = await this._getLogsAsync( - exchangeContractAddress, eventName, subscriptionOpts, indexFilterValues, artifacts.ExchangeArtifact.abi, + exchangeContractAddress, eventName, blockRange, indexFilterValues, artifacts.ExchangeArtifact.abi, ); return logs; } -- cgit v1.2.3 From 436d78eb93792e352049c790b10fbeddde199cab Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 18 Dec 2017 17:06:00 +0100 Subject: Fix linter issues --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/0x.js/src/contract_wrappers/exchange_wrapper.ts') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 7739defc0..274f217c6 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -7,6 +7,7 @@ import * as Web3 from 'web3'; import {artifacts} from '../artifacts'; import { BlockParamLiteral, + BlockRange, DecodedLogArgs, ECSignature, EventCallback, @@ -25,7 +26,6 @@ import { OrderTransactionOpts, OrderValues, SignedOrder, - BlockRange, ValidateOrderFillableOpts, } from '../types'; import {AbiDecoder} from '../utils/abi_decoder'; @@ -616,7 +616,7 @@ export class ExchangeWrapper extends ContractWrapper { /** * Gets historical logs without creating a subscription * @param eventName The exchange contract event you would like to subscribe to. - * @param blockRange Subscriptions options that let you configure the subscription. + * @param blockRange Subscriptions options that let you configure the subscription. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters -- cgit v1.2.3 From 156dae1d33bd0a19c764262fbf0c9d6743425fc6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 19 Dec 2017 12:03:52 +0100 Subject: Fix comments --- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/0x.js/src/contract_wrappers/exchange_wrapper.ts') diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index 274f217c6..df793aa06 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -616,7 +616,7 @@ export class ExchangeWrapper extends ContractWrapper { /** * Gets historical logs without creating a subscription * @param eventName The exchange contract event you would like to subscribe to. - * @param blockRange Subscriptions options that let you configure the subscription. + * @param blockRange Block range to get logs from. * @param indexFilterValues An object where the keys are indexed args returned by the event and * the value is the value you are interested in. E.g `{_from: aUserAddressHex}` * @return Array of logs that match the parameters -- cgit v1.2.3