aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-10 06:45:37 +0800
committerFabio Berger <me@fabioberger.com>2017-11-10 06:45:37 +0800
commit0e69356ca9dae26a2940a77d14aca79d0ff36831 (patch)
treea0189bbad152b17a8c82b18c01e4c00db1e063cc
parent90348e08c14d12e107af5ce103781399ade7fb63 (diff)
parentc60d7e2db857331f66140c9d9a49f4161a8bf8a4 (diff)
downloaddexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar.gz
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar.bz2
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar.lz
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar.xz
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.tar.zst
dexon-sol-tools-0e69356ca9dae26a2940a77d14aca79d0ff36831.zip
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
-rw-r--r--src/order_watcher/event_watcher.ts5
1 files 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,