Fix getting events from non-mempool
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user