diff options
author | Fabio Berger <me@fabioberger.com> | 2018-07-16 16:24:34 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-07-16 16:24:34 +0800 |
commit | 151ce6e3c77e43659899ce299ac9f1b37cf6a042 (patch) | |
tree | be40ea718262aa98cac1da0c1a1a1974991ed451 | |
parent | 345f3c07a51a17728f13d954839dcb7047ff6401 (diff) | |
download | dexon-0x-contracts-151ce6e3c77e43659899ce299ac9f1b37cf6a042.tar.gz dexon-0x-contracts-151ce6e3c77e43659899ce299ac9f1b37cf6a042.tar.zst dexon-0x-contracts-151ce6e3c77e43659899ce299ac9f1b37cf6a042.zip |
Pass stateLater into getBlockAsync call
-rw-r--r-- | packages/order-watcher/src/order_watcher/event_watcher.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/order-watcher/src/order_watcher/event_watcher.ts b/packages/order-watcher/src/order_watcher/event_watcher.ts index 0d3652012..d52c6a21e 100644 --- a/packages/order-watcher/src/order_watcher/event_watcher.ts +++ b/packages/order-watcher/src/order_watcher/event_watcher.ts @@ -106,7 +106,7 @@ export class EventWatcher { await this._emitDifferencesAsync(log, isRemoved ? LogEventState.Removed : LogEventState.Added, callback); } private async _reconcileBlockAsync(): Promise<void> { - const latestBlock = await this._web3Wrapper.getBlockAsync(BlockParamLiteral.Latest); + const latestBlock = await this._web3Wrapper.getBlockAsync(this._stateLayer); // We need to coerce to Block type cause Web3.Block includes types for mempool blocks if (!_.isUndefined(this._blockAndLogStreamerIfExists)) { // If we clear the interval while fetching the block - this._blockAndLogStreamer will be undefined |