From ac2c723ec9044589ad6495f4fd915db1f9eda3a7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 22 Nov 2017 11:56:34 -0600 Subject: Last renames --- packages/0x.js/src/order_watcher/expiration_watcher.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 862714cc5..717edaad7 100644 --- a/packages/0x.js/src/order_watcher/expiration_watcher.ts +++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts @@ -55,16 +55,16 @@ export class ExpirationWatcher { private async pruneExpiredOrdersAsync(callbackAsync: (orderHash: string) => Promise): Promise { const currentUnixTimestampMs = utils.getCurrentUnixTimestampMs(); while (true) { - const noOrdersLeft = this.orderHashByExpirationRBTree.size === 0; - if (noOrdersLeft) { + const hasTrakedOrders = this.orderHashByExpirationRBTree.size === 0; + if (hasTrakedOrders) { break; } const nextOrderHashToExpire = this.orderHashByExpirationRBTree.min(); - const noExpiredOrdersLeft = this.expiration[nextOrderHashToExpire].greaterThan( + const hasNoExpiredOrders = this.expiration[nextOrderHashToExpire].greaterThan( currentUnixTimestampMs.plus(this.expirationMarginMs), ); - const noActiveSubscription = _.isUndefined(this.orderExpirationCheckingIntervalIdIfExists); - if (noExpiredOrdersLeft || noActiveSubscription) { + const isSubscriptionActive = _.isUndefined(this.orderExpirationCheckingIntervalIdIfExists); + if (hasNoExpiredOrders || isSubscriptionActive) { break; } const orderHash = this.orderHashByExpirationRBTree.min(); -- cgit v1.2.3