Fix getting events from non-mempool

This commit is contained in:
Leonid Logvinov
2017-11-09 17:44:36 -05:00
parent 50d3a14825
commit c60d7e2db8

View File

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