From c068ec5231a97752a914eaa0479750c05b5c6342 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 20 Nov 2017 12:49:55 -0600 Subject: Add ifExists suffix --- packages/0x.js/src/order_watcher/expiration_watcher.ts | 4 ++-- packages/0x.js/src/order_watcher/order_state_watcher.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts index d699b7a51..cf0222e3c 100644 --- a/packages/0x.js/src/order_watcher/expiration_watcher.ts +++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts @@ -18,8 +18,8 @@ export class ExpirationWatcher { private callbackIfExists?: (orderHash: string) => void; private orderExpirationCheckingIntervalMs: number; private orderExpirationCheckingIntervalIdIfExists?: NodeJS.Timer; - constructor(orderExpirationCheckingIntervalMs?: number) { - this.orderExpirationCheckingIntervalMs = orderExpirationCheckingIntervalMs || + constructor(orderExpirationCheckingIntervalMsIfExists?: number) { + this.orderExpirationCheckingIntervalMs = orderExpirationCheckingIntervalMsIfExists || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS; const scoreFunction = (orderHash: string) => this.expiration[orderHash].toNumber(); this.orderHashHeapByExpiration = new Heap(scoreFunction); diff --git a/packages/0x.js/src/order_watcher/order_state_watcher.ts b/packages/0x.js/src/order_watcher/order_state_watcher.ts index bc61e415c..40007805f 100644 --- a/packages/0x.js/src/order_watcher/order_state_watcher.ts +++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts @@ -74,10 +74,10 @@ export class OrderStateWatcher { this._orderStateUtils = new OrderStateUtils( this._balanceAndProxyAllowanceLazyStore, this._orderFilledCancelledLazyStore, ); - const orderExpirationCheckingIntervalMs = _.isUndefined(config) ? - undefined : - config.orderExpirationCheckingIntervalMs; - this._expirationWatcher = new ExpirationWatcher(orderExpirationCheckingIntervalMs); + const orderExpirationCheckingIntervalMsIfExists = _.isUndefined(config) ? + undefined : + config.orderExpirationCheckingIntervalMs; + this._expirationWatcher = new ExpirationWatcher(orderExpirationCheckingIntervalMsIfExists); } /** * Add an order to the orderStateWatcher. Before the order is added, it's -- cgit v1.2.3