aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-22 07:58:29 +0800
committerAlex Browne <stephenalexbrowne@gmail.com>2018-05-22 07:58:29 +0800
commita5d315ee2adac392875439f4902491559ad98c8b (patch)
treec9d71ca624add6d3da04a2c844c4e66a76485d32 /packages/contracts/test
parent4fa57f55e640d94099a9047cb23b5a003dc69068 (diff)
downloaddexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar.gz
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar.bz2
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar.lz
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar.xz
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.tar.zst
dexon-sol-tools-a5d315ee2adac392875439f4902491559ad98c8b.zip
Apply changes to test/exchange/match_orders.ts
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/exchange/match_orders.ts24
1 files changed, 18 insertions, 6 deletions
diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts
index 94cdf4598..b08b9e763 100644
--- a/packages/contracts/test/exchange/match_orders.ts
+++ b/packages/contracts/test/exchange/match_orders.ts
@@ -79,6 +79,12 @@ describe('matchOrders', () => {
let zeroEx: ZeroEx;
before(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ after(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+ before(async () => {
// Create accounts
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([
@@ -119,12 +125,18 @@ describe('matchOrders', () => {
await exchangeWrapper.registerAssetProxyAsync(AssetProxyId.ERC20, erc20Proxy.address, owner);
await exchangeWrapper.registerAssetProxyAsync(AssetProxyId.ERC721, erc721Proxy.address, owner);
// Authorize ERC20 and ERC721 trades by exchange
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- });
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- });
+ await web3Wrapper.awaitTransactionMinedAsync(
+ await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
+ from: owner,
+ }),
+ constants.AWAIT_TRANSACTION_MINED_MS,
+ );
+ await web3Wrapper.awaitTransactionMinedAsync(
+ await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
+ from: owner,
+ }),
+ constants.AWAIT_TRANSACTION_MINED_MS,
+ );
// Set default addresses
defaultERC20MakerAssetAddress = erc20TokenA.address;
defaultERC20TakerAssetAddress = erc20TokenB.address;