diff options
Diffstat (limited to 'packages/contract-wrappers')
-rw-r--r-- | packages/contract-wrappers/src/utils/assert.ts | 2 | ||||
-rw-r--r-- | packages/contract-wrappers/test/ether_token_wrapper_test.ts | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts index da6697b08..842b16fa0 100644 --- a/packages/contract-wrappers/src/utils/assert.ts +++ b/packages/contract-wrappers/src/utils/assert.ts @@ -1,5 +1,5 @@ import { assert as sharedAssert } from '@0xproject/assert'; -// We need those two unused imports because they're actually used by sharedAssert which gets injected here +// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable import { isValidSignatureAsync } from '@0xproject/order-utils'; import { ECSignature } from '@0xproject/types'; // tslint:disable-line:no-unused-variable diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts index 0a860884a..48bd6d3f6 100644 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts @@ -336,15 +336,19 @@ describe('EtherTokenWrapper', () => { describe('#getLogsAsync', () => { let etherTokenAddress: string; let erc20ProxyAddress: string; - const blockRange: BlockRange = { - fromBlock: 0, - toBlock: BlockParamLiteral.Latest, - }; + let blockRange: BlockRange; let txHash: string; - before(() => { + before(async () => { addressWithETH = userAddresses[0]; etherTokenAddress = tokenUtils.getWethTokenAddress(); erc20ProxyAddress = contractWrappers.erc20Proxy.getContractAddress(); + // Start the block range after all migrations to avoid unexpected logs + const currentBlock = await web3Wrapper.getBlockNumberAsync(); + const fromBlock = currentBlock + 1; + blockRange = { + fromBlock, + toBlock: BlockParamLiteral.Latest, + }; }); it('should get logs with decoded args emitted by Approval', async () => { txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync( |