Merge branches 'orderWatcher' and 'orderWatcher' of github.com:0xProject/0x.js into orderWatcher

* 'orderWatcher' of github.com:0xProject/0x.js:
  Fix getting events from non-mempool

* 'orderWatcher' of github.com:0xProject/0x.js:
  Fix getting events from non-mempool
This commit is contained in:
Fabio Berger
2017-11-09 17:45:37 -05:00

View File

@@ -53,8 +53,9 @@ export class EventWatcher {
fromBlock = BlockParamLiteral.Pending; fromBlock = BlockParamLiteral.Pending;
toBlock = BlockParamLiteral.Pending; toBlock = BlockParamLiteral.Pending;
} else { } else {
toBlock = await this._web3Wrapper.getBlockNumberAsync(); const currentBlock = await this._web3Wrapper.getBlockNumberAsync();
fromBlock = toBlock - numConfirmations; toBlock = currentBlock - numConfirmations;
fromBlock = currentBlock - numConfirmations;
} }
const eventFilter = { const eventFilter = {
fromBlock, fromBlock,