diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-14 01:44:56 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-14 01:44:56 +0800 |
commit | 5fc7d9a6032b816156f6c2b39002936649bcbabd (patch) | |
tree | 95cb881321951f6d61fae08709d87e9f7ad8d58d /packages/order-watcher/src | |
parent | ced68e4e022eb1020a4d15ab9a64552b4f92744a (diff) | |
download | dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.gz dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.zst dexon-0x-contracts-5fc7d9a6032b816156f6c2b39002936649bcbabd.zip |
Fix bug that make all getBlock and getLog requests go to latest block
Diffstat (limited to 'packages/order-watcher/src')
-rw-r--r-- | packages/order-watcher/src/order_watcher/event_watcher.ts | 8 |
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, |