From 5fc7d9a6032b816156f6c2b39002936649bcbabd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 13 Jul 2018 19:44:56 +0200 Subject: Fix bug that make all getBlock and getLog requests go to latest block --- packages/order-watcher/src/order_watcher/event_watcher.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'packages/order-watcher/src') 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, -- cgit v1.2.3