diff options
Diffstat (limited to 'packages/order-watcher/src/order_watcher/order_watcher.ts')
-rw-r--r-- | packages/order-watcher/src/order_watcher/order_watcher.ts | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts index af479f32d..0ad3267d8 100644 --- a/packages/order-watcher/src/order_watcher/order_watcher.ts +++ b/packages/order-watcher/src/order_watcher/order_watcher.ts @@ -58,7 +58,6 @@ interface OrderStateByOrderHash { } const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = { - stateLayer: BlockParamLiteral.Latest, orderExpirationCheckingIntervalMs: 50, eventPollingIntervalMs: 200, expirationMarginMs: 0, @@ -66,6 +65,7 @@ const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = { cleanupJobIntervalMs: 1000 * 60 * 60, // 1h isVerbose: true, }; +const STATE_LAYER = BlockParamLiteral.Latest; /** * This class includes all the functionality related to watching a set of orders @@ -107,24 +107,16 @@ export class OrderWatcher { [artifacts.EtherToken.abi, artifacts.Exchange.abi], ); const contractWrappers = new ContractWrappers(provider, { networkId }); - this._eventWatcher = new EventWatcher( - provider, - config.eventPollingIntervalMs, - config.stateLayer, - config.isVerbose, - ); + this._eventWatcher = new EventWatcher(provider, config.eventPollingIntervalMs, STATE_LAYER, config.isVerbose); const balanceAndProxyAllowanceFetcher = new AssetBalanceAndProxyAllowanceFetcher( contractWrappers.erc20Token, contractWrappers.erc721Token, - config.stateLayer, + STATE_LAYER, ); this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore( balanceAndProxyAllowanceFetcher, ); - const orderFilledCancelledFetcher = new OrderFilledCancelledFetcher( - contractWrappers.exchange, - config.stateLayer, - ); + const orderFilledCancelledFetcher = new OrderFilledCancelledFetcher(contractWrappers.exchange, STATE_LAYER); this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(orderFilledCancelledFetcher); this._orderStateUtils = new OrderStateUtils(balanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher); const expirationMarginIfExistsMs = _.isUndefined(config) ? undefined : config.expirationMarginMs; |