aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test/exchange_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-12-19 19:10:59 +0800
committerGitHub <noreply@github.com>2017-12-19 19:10:59 +0800
commit04268d7f4b4a8a3496518a450bfcf01bb056a57e (patch)
tree089c743f946ff175838b4ee3142d5ead1aecdc0c /packages/0x.js/test/exchange_wrapper_test.ts
parentc63f76dde7267c54328d2f12f401d94484e5a91a (diff)
parent156dae1d33bd0a19c764262fbf0c9d6743425fc6 (diff)
downloaddexon-0x-contracts-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.gz
dexon-0x-contracts-04268d7f4b4a8a3496518a450bfcf01bb056a57e.tar.zst
dexon-0x-contracts-04268d7f4b4a8a3496518a450bfcf01bb056a57e.zip
Merge pull request #272 from 0xProject/fix/subscription-opts
Rename SubscriptionOpts to BlockRange
Diffstat (limited to 'packages/0x.js/test/exchange_wrapper_test.ts')
-rw-r--r--packages/0x.js/test/exchange_wrapper_test.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts
index 51b511dbf..9c55069da 100644
--- a/packages/0x.js/test/exchange_wrapper_test.ts
+++ b/packages/0x.js/test/exchange_wrapper_test.ts
@@ -5,6 +5,7 @@ import 'mocha';
import * as Web3 from 'web3';
import {
+ BlockRange,
DecodedLogEvent,
ExchangeContractErrs,
ExchangeEvents,
@@ -13,7 +14,6 @@ import {
OrderCancellationRequest,
OrderFillRequest,
SignedOrder,
- SubscriptionOpts,
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<LogFillContractEventArgs>(
- eventName, subscriptionOpts, indexFilterValues,
+ eventName, blockRange, indexFilterValues,
);
expect(logs).to.have.length(1);
const args = logs[0].args;