diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-14 22:31:20 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-12-14 22:47:03 +0800 |
commit | 449a04d39ce49ac06e0de989dcbefe6f4a7d2e84 (patch) | |
tree | ebd2f7c7d25ee2706c3ca8c3aa1e942a6db9fe7a /packages/0x.js/test | |
parent | 4bcd7ba31ed2dc23f8fcfbe35ac68173045c9f8a (diff) | |
download | dexon-sol-tools-449a04d39ce49ac06e0de989dcbefe6f4a7d2e84.tar.gz dexon-sol-tools-449a04d39ce49ac06e0de989dcbefe6f4a7d2e84.tar.zst dexon-sol-tools-449a04d39ce49ac06e0de989dcbefe6f4a7d2e84.zip |
Rename tokenUtils.getNonProtocolTokens to tokenUtils.getDummyTokens
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r-- | packages/0x.js/test/exchange_wrapper_test.ts | 16 | ||||
-rw-r--r-- | packages/0x.js/test/expiration_watcher_test.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/test/order_state_watcher_test.ts | 3 | ||||
-rw-r--r-- | packages/0x.js/test/order_validation_test.ts | 4 |
4 files changed, 14 insertions, 11 deletions
diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts index b7628e6d2..dea961026 100644 --- a/packages/0x.js/test/exchange_wrapper_test.ts +++ b/packages/0x.js/test/exchange_wrapper_test.ts @@ -53,6 +53,7 @@ describe('ExchangeWrapper', () => { tokenUtils = new TokenUtils(tokens); zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address; fillScenarios = new FillScenarios(zeroEx, userAddresses, tokens, zrxTokenAddress, exchangeContractAddress); + await fillScenarios.initTokenBalancesAsync(); }); beforeEach(async () => { await blockchainLifecycle.startAsync(); @@ -71,7 +72,7 @@ describe('ExchangeWrapper', () => { before(async () => { [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses; tokens = await zeroEx.tokenRegistry.getTokensAsync(); - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); @@ -201,7 +202,7 @@ describe('ExchangeWrapper', () => { before(async () => { [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses; tokens = await zeroEx.tokenRegistry.getTokensAsync(); - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); @@ -436,7 +437,7 @@ describe('ExchangeWrapper', () => { const cancelAmount = new BigNumber(3); beforeEach(async () => { [coinbase, makerAddress, takerAddress] = userAddresses; - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; signedOrder = await fillScenarios.createFillableSignedOrderAsync( @@ -557,7 +558,8 @@ describe('ExchangeWrapper', () => { let orderHash: string; before(() => { takerAddress = userAddresses[1]; - const [makerToken, takerToken] = tokens; + tokenUtils = new TokenUtils(tokens); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); @@ -633,7 +635,7 @@ describe('ExchangeWrapper', () => { const cancelTakerAmountInBaseUnits = new BigNumber(1); before(() => { [coinbase, makerAddress, takerAddress] = userAddresses; - const [makerToken, takerToken] = tokens; + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); @@ -731,7 +733,7 @@ describe('ExchangeWrapper', () => { const fillableAmount = new BigNumber(5); before(async () => { [, makerAddress, takerAddress] = userAddresses; - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); @@ -766,7 +768,7 @@ describe('ExchangeWrapper', () => { let txHash: string; before(async () => { [, makerAddress, takerAddress] = userAddresses; - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); diff --git a/packages/0x.js/test/expiration_watcher_test.ts b/packages/0x.js/test/expiration_watcher_test.ts index e72653b67..c1618ce9d 100644 --- a/packages/0x.js/test/expiration_watcher_test.ts +++ b/packages/0x.js/test/expiration_watcher_test.ts @@ -57,7 +57,7 @@ describe('ExpirationWatcher', () => { fillScenarios = new FillScenarios(zeroEx, userAddresses, tokens, zrxTokenAddress, exchangeContractAddress); [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses; tokens = await zeroEx.tokenRegistry.getTokensAsync(); - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; }); diff --git a/packages/0x.js/test/order_state_watcher_test.ts b/packages/0x.js/test/order_state_watcher_test.ts index 4086c00fd..99e6646a3 100644 --- a/packages/0x.js/test/order_state_watcher_test.ts +++ b/packages/0x.js/test/order_state_watcher_test.ts @@ -65,7 +65,8 @@ describe('OrderStateWatcher', () => { tokenUtils = new TokenUtils(tokens); zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address; fillScenarios = new FillScenarios(zeroEx, userAddresses, tokens, zrxTokenAddress, exchangeContractAddress); - [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + await fillScenarios.initTokenBalancesAsync(); + [makerToken, takerToken] = tokenUtils.getDummyTokens(); web3Wrapper = (zeroEx as any)._web3Wrapper; }); beforeEach(async () => { diff --git a/packages/0x.js/test/order_validation_test.ts b/packages/0x.js/test/order_validation_test.ts index 9c36ce0d6..c6d5d3392 100644 --- a/packages/0x.js/test/order_validation_test.ts +++ b/packages/0x.js/test/order_validation_test.ts @@ -50,7 +50,7 @@ describe('OrderValidation', () => { tokenUtils = new TokenUtils(tokens); zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address; fillScenarios = new FillScenarios(zeroEx, userAddresses, tokens, zrxTokenAddress, exchangeContractAddress); - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; orderValidationUtils = new OrderValidationUtils(zeroEx.token, zeroEx.exchange); @@ -185,7 +185,7 @@ describe('OrderValidation', () => { const cancelAmount = new BigNumber(3); beforeEach(async () => { [coinbase, makerAddress, takerAddress] = userAddresses; - const [makerToken, takerToken] = tokenUtils.getNonProtocolTokens(); + const [makerToken, takerToken] = tokenUtils.getDummyTokens(); makerTokenAddress = makerToken.address; takerTokenAddress = takerToken.address; signedOrder = await fillScenarios.createFillableSignedOrderAsync( |