diff options
author | Jacob Evans <jacob@dekz.net> | 2018-06-05 07:55:22 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-06-05 07:55:22 +0800 |
commit | 351173e554b4259f6a95f066b15d97317835aa8d (patch) | |
tree | 5982d149c392352e6d097369e042ddbe77754669 | |
parent | 342432dc76d1bfc2531fb2edef77afc523eacefe (diff) | |
download | dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar.gz dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar.bz2 dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar.lz dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar.xz dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.tar.zst dexon-sol-tools-351173e554b4259f6a95f066b15d97317835aa8d.zip |
Rebase from v2-prototype
-rw-r--r-- | packages/contracts/test/exchange/core.ts | 38 | ||||
-rw-r--r-- | packages/contracts/test/exchange/transactions.ts | 2 |
2 files changed, 2 insertions, 38 deletions
diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 16492b8ac..91ead93f0 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -25,7 +25,7 @@ import { ERC721Wrapper } from '../../src/utils/erc721_wrapper'; import { ExchangeWrapper } from '../../src/utils/exchange_wrapper'; import { OrderFactory } from '../../src/utils/order_factory'; import { orderUtils } from '../../src/utils/order_utils'; -import { ContractName, ERC20BalancesByOwner, ExchangeStatus } from '../../src/utils/types'; +import { ContractName, ERC20BalancesByOwner, OrderStatus } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); @@ -131,42 +131,6 @@ describe('Exchange core', () => { erc20Balances = await erc20Wrapper.getBalancesAsync(); signedOrder = orderFactory.newSignedOrder(); }); - -<<<<<<< HEAD - it('should create an unfillable order', async () => { - signedOrder = orderFactory.newSignedOrder({ - makerAssetAmount: new BigNumber(1001), - takerAssetAmount: new BigNumber(3), - }); - - const takerAssetFilledAmountBefore = await exchangeWrapper.getTakerAssetFilledAmountAsync( - orderHashUtils.getOrderHashHex(signedOrder), - ); - expect(takerAssetFilledAmountBefore).to.be.bignumber.equal(0); - - const fillTakerAssetAmount1 = new BigNumber(2); - await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { - takerAssetFillAmount: fillTakerAssetAmount1, - }); - - const takerAssetFilledAmountAfter1 = await exchangeWrapper.getTakerAssetFilledAmountAsync( - orderHashUtils.getOrderHashHex(signedOrder), - ); - expect(takerAssetFilledAmountAfter1).to.be.bignumber.equal(fillTakerAssetAmount1); - - const fillTakerAssetAmount2 = new BigNumber(1); - await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { - takerAssetFillAmount: fillTakerAssetAmount2, - }); - - const takerAssetFilledAmountAfter2 = await exchangeWrapper.getTakerAssetFilledAmountAsync( - orderHashUtils.getOrderHashHex(signedOrder), - ); - expect(takerAssetFilledAmountAfter2).to.be.bignumber.equal(takerAssetFilledAmountAfter1); - }); - -======= ->>>>>>> Update Exchange statuses, revert instead of emmitting event on fill/cancel failures, and remove redundant logic in matchOrders it('should transfer the correct amounts when makerAssetAmount === takerAssetAmount', async () => { signedOrder = orderFactory.newSignedOrder({ makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18), diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index 6480b7e0b..f31053ad3 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -18,7 +18,7 @@ import { ExchangeWrapper } from '../../src/utils/exchange_wrapper'; import { OrderFactory } from '../../src/utils/order_factory'; import { orderUtils } from '../../src/utils/order_utils'; import { TransactionFactory } from '../../src/utils/transaction_factory'; -import { ERC20BalancesByOwner, ExchangeStatus, SignedTransaction } from '../../src/utils/types'; +import { ERC20BalancesByOwner, OrderStatus, SignedTransaction } from '../../src/utils/types'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; chaiSetup.configure(); |