From c60d7e2db857331f66140c9d9a49f4161a8bf8a4 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 9 Nov 2017 17:44:36 -0500 Subject: Fix getting events from non-mempool --- src/order_watcher/event_watcher.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/order_watcher/event_watcher.ts b/src/order_watcher/event_watcher.ts index 471dcd21a..f1a2b5729 100644 --- a/src/order_watcher/event_watcher.ts +++ b/src/order_watcher/event_watcher.ts @@ -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, -- cgit