aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
committerFabio Berger <me@fabioberger.com>2017-12-20 05:58:06 +0800
commit41104b2d457b9b662122c139ee83bb8d0f519a51 (patch)
tree4743803be2564e0e5221b9a41e2c293a6fe52dd9 /packages/0x.js/test
parent2930537a512bdaa74181fea74ce6befdf5b305b4 (diff)
parentc39ac903a972930d538f8fa3292c658201b1c5e5 (diff)
downloaddexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.gz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.bz2
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.lz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.xz
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.tar.zst
dexon-sol-tools-41104b2d457b9b662122c139ee83bb8d0f519a51.zip
Merge branch 'development' into createWethPage
* development: (27 commits) Remove re-assignment Fix scrolling topBar on Portal Fix overflow issue on calculated fillAmount Fix faulty import Introduce an identityCommandBuilder Define types for methodID Define types for ethereumjs-abi Install types for yargs Fix comments Fix linter issues Fix linter error Rename SubscriptionOpts to BlockRange Refactor remaining _.assign to spread operator Move muiTheme into it's own module Refactor configs and constants, standardize on uppercase/snakecase, alphebetize, rename for logical grouping Sort colors into color spectrum remove unused style standarize on `grey` over `gray` spelling and other color related fixes Standardize colors to always be in uppercase hex and consolidate material-ui greys Consolidate all custom colors and material-ui colors into a colors module ... # Conflicts: # packages/website/ts/components/eth_wrappers.tsx # packages/website/ts/components/portal.tsx # packages/website/ts/utils/configs.ts # packages/website/ts/utils/constants.ts
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r--packages/0x.js/test/exchange_wrapper_test.ts10
-rw-r--r--packages/0x.js/test/token_wrapper_test.ts10
2 files changed, 10 insertions, 10 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;
diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts
index 70637dbfe..48742b663 100644
--- a/packages/0x.js/test/token_wrapper_test.ts
+++ b/packages/0x.js/test/token_wrapper_test.ts
@@ -7,8 +7,8 @@ import * as Web3 from 'web3';
import {
ApprovalContractEventArgs,
+ BlockRange,
DecodedLogEvent,
- SubscriptionOpts,
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<ApprovalContractEventArgs>(
- 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<ApprovalContractEventArgs>(
- tokenAddress, eventName, subscriptionOpts, indexFilterValues,
+ tokenAddress, eventName, blockRange, indexFilterValues,
);
expect(logs).to.have.length(1);
const args = logs[0].args;