aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/protocol/test
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/protocol/test')
-rw-r--r--contracts/protocol/test/asset_proxy/proxies.ts7
-rw-r--r--contracts/protocol/test/exchange/core.ts20
-rw-r--r--contracts/protocol/test/exchange/internal.ts3
3 files changed, 11 insertions, 19 deletions
diff --git a/contracts/protocol/test/asset_proxy/proxies.ts b/contracts/protocol/test/asset_proxy/proxies.ts
index 650594c12..bbb44f402 100644
--- a/contracts/protocol/test/asset_proxy/proxies.ts
+++ b/contracts/protocol/test/asset_proxy/proxies.ts
@@ -107,7 +107,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
// Configure ERC721Proxy
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
@@ -115,7 +114,6 @@ describe('Asset Transfer Proxies', () => {
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
from: owner,
@@ -123,7 +121,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
// Configure MultiAssetProxy
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
@@ -131,14 +128,12 @@ describe('Asset Transfer Proxies', () => {
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
from: owner,
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
from: owner,
@@ -146,7 +141,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
-
// Deploy and configure ERC20 tokens
const numDummyErc20ToDeploy = 2;
[erc20TokenA, erc20TokenB] = await erc20Wrapper.deployDummyTokensAsync(
@@ -172,7 +166,6 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
-
await erc20Wrapper.setBalancesAndAllowancesAsync();
await web3Wrapper.awaitTransactionSuccessAsync(
await noReturnErc20Token.setBalance.sendTransactionAsync(fromAddress, constants.INITIAL_ERC20_BALANCE),
diff --git a/contracts/protocol/test/exchange/core.ts b/contracts/protocol/test/exchange/core.ts
index ec0f41f85..700643b79 100644
--- a/contracts/protocol/test/exchange/core.ts
+++ b/contracts/protocol/test/exchange/core.ts
@@ -1046,7 +1046,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Fillable;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for a fully filled order', async () => {
await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
@@ -1056,7 +1056,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.FullyFilled;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for a partially filled order', async () => {
const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
@@ -1067,7 +1067,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Fillable;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for a cancelled and unfilled order', async () => {
await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
@@ -1077,7 +1077,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Cancelled;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for a cancelled and partially filled order', async () => {
const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
@@ -1089,7 +1089,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Cancelled;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for an expired and unfilled order', async () => {
const currentTimestamp = await getLatestBlockTimestampAsync();
@@ -1101,7 +1101,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Expired;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for an expired and partially filled order', async () => {
const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
@@ -1115,7 +1115,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.Expired;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for an expired and fully filled order', async () => {
await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
@@ -1129,7 +1129,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.FullyFilled;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for an order with a makerAssetAmount of 0', async () => {
signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: new BigNumber(0) });
@@ -1139,7 +1139,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.InvalidMakerAssetAmount;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
it('should return the correct orderInfo for an order with a takerAssetAmount of 0', async () => {
signedOrder = await orderFactory.newSignedOrderAsync({ takerAssetAmount: new BigNumber(0) });
@@ -1149,7 +1149,7 @@ describe('Exchange core', () => {
const expectedOrderStatus = OrderStatus.InvalidTakerAssetAmount;
expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.be.equal(expectedOrderStatus);
+ expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
});
});
});
diff --git a/contracts/protocol/test/exchange/internal.ts b/contracts/protocol/test/exchange/internal.ts
index c65c477b2..972f5efb6 100644
--- a/contracts/protocol/test/exchange/internal.ts
+++ b/contracts/protocol/test/exchange/internal.ts
@@ -8,7 +8,6 @@ import {
testCombinatoriallyWithReferenceFuncAsync,
txDefaults,
uint256Values,
- orderUtils,
web3Wrapper,
} from '@0x/contracts-test-utils';
import { BlockchainLifecycle } from '@0x/dev-utils';
@@ -453,7 +452,7 @@ describe('Exchange core internal functions', () => {
};
await web3Wrapper.awaitTransactionSuccessAsync(
await testExchange.publicUpdateFilledState.sendTransactionAsync(
- orderUtils.getOrderWithoutExchangeAddress(emptySignedOrder),
+ emptySignedOrder,
constants.NULL_ADDRESS,
orderHash,
orderTakerAssetFilledAmount,