Contract Wrappers - Ether token block range

Start after migrations to avoid any unexpected logs
This commit is contained in:
Jacob Evans 2018-07-11 20:45:18 +10:00
parent 81b4f4928d
commit 0b6ea1d046
No known key found for this signature in database
GPG Key ID: 2036DA2ADDFB0842

View File

@ -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(