aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/order_watcher
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-21 01:05:37 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-21 01:05:37 +0800
commitc4d10a6f2d14f23367500d4eb46de7097b00d209 (patch)
treedd32bbed3646c713cc8a5d70a26e18fa41a504d8 /packages/0x.js/src/order_watcher
parente755ed927cef8352900187b5487881a3fa4847f1 (diff)
downloaddexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar.gz
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar.bz2
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar.lz
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar.xz
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.tar.zst
dexon-sol-tools-c4d10a6f2d14f23367500d4eb46de7097b00d209.zip
Do simple inits inline
Diffstat (limited to 'packages/0x.js/src/order_watcher')
-rw-r--r--packages/0x.js/src/order_watcher/expiration_watcher.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts
index 5153cd8b9..b211ee826 100644
--- a/packages/0x.js/src/order_watcher/expiration_watcher.ts
+++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts
@@ -15,14 +15,13 @@ const DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS = 50;
*/
export class ExpirationWatcher {
private orderHashHeapByExpiration: Heap<string>;
- private expiration: {[orderHash: string]: BigNumber};
+ private expiration: {[orderHash: string]: BigNumber} = {};
private callbackIfExists?: (orderHash: string) => void;
private orderExpirationCheckingIntervalMs: number;
private orderExpirationCheckingIntervalIdIfExists?: NodeJS.Timer;
constructor(orderExpirationCheckingIntervalMs?: number) {
this.orderExpirationCheckingIntervalMs = orderExpirationCheckingIntervalMs ||
DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
- this.expiration = {};
const scoreFunction = ((orderHash: string) => {
return this.expiration[orderHash].toNumber();
}).bind(this);