aboutsummaryrefslogtreecommitdiffstats
path: root/packages
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 /packages
parentced68e4e022eb1020a4d15ab9a64552b4f92744a (diff)
downloaddexon-sol-tools-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.gz
dexon-sol-tools-5fc7d9a6032b816156f6c2b39002936649bcbabd.tar.zst
dexon-sol-tools-5fc7d9a6032b816156f6c2b39002936649bcbabd.zip
Fix bug that make all getBlock and getLog requests go to latest block
Diffstat (limited to 'packages')
-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,