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/test/exchange_wrapper_test.ts | 10 +++++----- packages/0x.js/test/token_wrapper_test.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts index 51b511dbf..6605e7e52 100644 --- a/packages/0x.js/test/exchange_wrapper_test.ts +++ b/packages/0x.js/test/exchange_wrapper_test.ts @@ -13,7 +13,7 @@ import { OrderCancellationRequest, OrderFillRequest, SignedOrder, - SubscriptionOpts, + BlockRange, Token, ZeroEx, } from '../src'; @@ -760,7 +760,7 @@ describe('ExchangeWrapper', () => { let takerAddress: string; const fillableAmount = new BigNumber(5); const shouldThrowOnInsufficientBalanceOrAllowance = true; - const subscriptionOpts: SubscriptionOpts = { + const blockRange: BlockRange = { fromBlock: 0, toBlock: BlockParamLiteral.Latest, }; @@ -781,7 +781,7 @@ describe('ExchangeWrapper', () => { await zeroEx.awaitTransactionMinedAsync(txHash); const eventName = ExchangeEvents.LogFill; const indexFilterValues = {}; - const logs = await zeroEx.exchange.getLogsAsync(eventName, subscriptionOpts, indexFilterValues); + const logs = await zeroEx.exchange.getLogsAsync(eventName, blockRange, indexFilterValues); expect(logs).to.have.length(1); expect(logs[0].event).to.be.equal(eventName); }); @@ -795,7 +795,7 @@ describe('ExchangeWrapper', () => { await zeroEx.awaitTransactionMinedAsync(txHash); const differentEventName = ExchangeEvents.LogCancel; const indexFilterValues = {}; - const logs = await zeroEx.exchange.getLogsAsync(differentEventName, subscriptionOpts, indexFilterValues); + const logs = await zeroEx.exchange.getLogsAsync(differentEventName, blockRange, indexFilterValues); expect(logs).to.have.length(0); }); it('should only get the logs with the correct indexed fields', async () => { @@ -821,7 +821,7 @@ describe('ExchangeWrapper', () => { maker: differentMakerAddress, }; const logs = await zeroEx.exchange.getLogsAsync( - eventName, subscriptionOpts, indexFilterValues, + eventName, blockRange, indexFilterValues, ); expect(logs).to.have.length(1); const args = logs[0].args; diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index 70637dbfe..5111a05d2 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -8,7 +8,7 @@ import * as Web3 from 'web3'; import { ApprovalContractEventArgs, DecodedLogEvent, - SubscriptionOpts, + BlockRange, Token, TokenEvents, TransferContractEventArgs, @@ -433,7 +433,7 @@ describe('TokenWrapper', () => { describe('#getLogsAsync', () => { let tokenAddress: string; let tokenTransferProxyAddress: string; - const subscriptionOpts: SubscriptionOpts = { + const blockRange: BlockRange = { fromBlock: 0, toBlock: BlockParamLiteral.Latest, }; @@ -449,7 +449,7 @@ describe('TokenWrapper', () => { const eventName = TokenEvents.Approval; const indexFilterValues = {}; const logs = await zeroEx.token.getLogsAsync( - tokenAddress, eventName, subscriptionOpts, indexFilterValues, + tokenAddress, eventName, blockRange, indexFilterValues, ); expect(logs).to.have.length(1); const args = logs[0].args; @@ -464,7 +464,7 @@ describe('TokenWrapper', () => { const differentEventName = TokenEvents.Transfer; const indexFilterValues = {}; const logs = await zeroEx.token.getLogsAsync( - tokenAddress, differentEventName, subscriptionOpts, indexFilterValues, + tokenAddress, differentEventName, blockRange, indexFilterValues, ); expect(logs).to.have.length(0); }); @@ -478,7 +478,7 @@ describe('TokenWrapper', () => { _owner: coinbase, }; const logs = await zeroEx.token.getLogsAsync( - tokenAddress, eventName, subscriptionOpts, indexFilterValues, + tokenAddress, eventName, blockRange, indexFilterValues, ); expect(logs).to.have.length(1); const args = logs[0].args; -- cgit v1.2.3