aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/order_watcher
diff options
context:
space:
mode:
Diffstat (limited to 'packages/order-watcher/src/order_watcher')
-rw-r--r--packages/order-watcher/src/order_watcher/event_watcher.ts2
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts9
2 files changed, 5 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 1cd198a62..60a3c6297 100644
--- a/packages/order-watcher/src/order_watcher/event_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/event_watcher.ts
@@ -30,7 +30,7 @@ export class EventWatcher {
constructor(
web3Wrapper: Web3Wrapper,
pollingIntervalIfExistsMs: undefined | number,
- stateLayer: BlockParamLiteral = BlockParamLiteral.Latest,
+ stateLayer: BlockParamLiteral,
isVerbose: boolean,
) {
this._isVerbose = isVerbose;
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index b09ba8d9d..95671684f 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -61,6 +61,7 @@ interface OrderStateByOrderHash {
// tslint:disable-next-line:custom-no-magic-numbers
const DEFAULT_CLEANUP_JOB_INTERVAL_MS = 1000 * 60 * 60; // 1h
+const STATE_LAYER = BlockParamLiteral.Latest;
/**
* This class includes all the functionality related to watching a set of orders
@@ -91,17 +92,15 @@ export class OrderWatcher {
});
this._contractWrappers = new ContractWrappers(provider, { networkId });
const pollingIntervalIfExistsMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs;
- const stateLayer =
- _.isUndefined(config) || _.isUndefined(config.stateLayer) ? BlockParamLiteral.Latest : config.stateLayer;
const isVerbose = !_.isUndefined(config) && !_.isUndefined(config.isVerbose) ? config.isVerbose : false;
- this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, stateLayer, isVerbose);
+ this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, STATE_LAYER, isVerbose);
this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
this._contractWrappers.token,
- stateLayer,
+ STATE_LAYER,
);
this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(
this._contractWrappers.exchange,
- stateLayer,
+ STATE_LAYER,
);
this._orderStateUtils = new OrderStateUtils(
this._balanceAndProxyAllowanceLazyStore,