From c83864af9cf6eb8e08610b56dc86382a8dd859f6 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Thu, 8 Aug 2019 02:47:10 -0400 Subject: [PATCH] `@0x/contracts-exchange`: Fix broken tests. `@0x/contracts-test-utils`: Remove unecessary wait timeout in `LogDecoder`. --- contracts/exchange/test/transactions.ts | 6 ++++-- contracts/test-utils/src/log_decoder.ts | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/contracts/exchange/test/transactions.ts b/contracts/exchange/test/transactions.ts index c24c7faf39..a0e9f2e40e 100644 --- a/contracts/exchange/test/transactions.ts +++ b/contracts/exchange/test/transactions.ts @@ -1,6 +1,6 @@ // tslint:disable: max-file-line-count import { ERC20ProxyContract, ERC20Wrapper } from '@0x/contracts-asset-proxy'; -import { DummyERC20TokenContract } from '@0x/contracts-erc20'; +import { artifacts as erc20Artifacts, DummyERC20TokenContract } from '@0x/contracts-erc20'; import { blockchainTests, constants, @@ -25,7 +25,7 @@ import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; import { - artifacts, + artifacts as localArtifacts, constants as exchangeConstants, ExchangeCancelEventArgs, ExchangeCancelUpToEventArgs, @@ -40,6 +40,8 @@ import { WhitelistContract, } from '../src/'; +const artifacts = { ...erc20Artifacts, ...localArtifacts }; + // tslint:disable:no-unnecessary-type-assertion blockchainTests.resets('Exchange transactions', env => { let chainId: number; diff --git a/contracts/test-utils/src/log_decoder.ts b/contracts/test-utils/src/log_decoder.ts index 215e942381..b27d9f87bd 100644 --- a/contracts/test-utils/src/log_decoder.ts +++ b/contracts/test-utils/src/log_decoder.ts @@ -45,10 +45,7 @@ export class LogDecoder { return logWithDecodedArgsOrLog; } public async getTxWithDecodedLogsAsync(txHash: string): Promise { - const receipt = await this._web3Wrapper.awaitTransactionSuccessAsync( - txHash, - constants.AWAIT_TRANSACTION_MINED_MS, - ); + const receipt = await this._web3Wrapper.awaitTransactionSuccessAsync(txHash); return this.decodeReceiptLogs(receipt); } public decodeReceiptLogs(receipt: TransactionReceipt): TransactionReceiptWithDecodedLogs {