aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-14 01:44:56 +0800
committerFabio Berger <me@fabioberger.com>2018-07-14 01:44:56 +0800
commit5fc7d9a6032b816156f6c2b39002936649bcbabd (patch)
tree95cb881321951f6d61fae08709d87e9f7ad8d58d
parentced68e4e022eb1020a4d15ab9a64552b4f92744a (diff)
downloaddexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.gz
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.bz2
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.lz
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.xz
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.zst
dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.zip
Fix bug that make all getBlock and getLog requests go to latest block
-rw-r--r--packages/order-watcher/src/order_watcher/event_watcher.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/order-watcher/src/order_watcher/event_watcher.ts b/packages/order-watcher/src/order_watcher/event_watcher.ts
index 38ba8101e..0d3652012 100644
--- a/packages/order-watcher/src/order_watcher/event_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/event_watcher.ts
@@ -64,13 +64,9 @@ export class EventWatcher {
if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
}
- const eventFilter = {
- fromBlock: this._stateLayer,
- toBlock: this._stateLayer,
- };
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
- this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper, this._stateLayer),
- this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper, eventFilter),
+ this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper),
+ this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper),
this._onBlockAndLogStreamerError.bind(this),
{
blockRetention: this._blockRetention,