From 037e992de457fc9f5012576719470d6b4f2b118d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 11 Nov 2017 09:57:45 -0500 Subject: establish convention of initializing empty instances in instance declaration --- src/order_watcher/order_state_watcher.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/order_watcher/order_state_watcher.ts b/src/order_watcher/order_state_watcher.ts index dd5e3f73c..f7e3a38a0 100644 --- a/src/order_watcher/order_state_watcher.ts +++ b/src/order_watcher/order_state_watcher.ts @@ -42,8 +42,8 @@ interface OrderByOrderHash { * the order should be deemed invalid. */ export class OrderStateWatcher { - private _orderByOrderHash: OrderByOrderHash; - private _dependentOrderHashes: DependentOrderHashes; + private _orderByOrderHash: OrderByOrderHash = {}; + private _dependentOrderHashes: DependentOrderHashes = {}; private _web3Wrapper: Web3Wrapper; private _callbackIfExistsAsync?: OnOrderStateChangeCallback; private _eventWatcher: EventWatcher; @@ -55,8 +55,6 @@ export class OrderStateWatcher { config?: OrderStateWatcherConfig, ) { this._web3Wrapper = web3Wrapper; - this._orderByOrderHash = {}; - this._dependentOrderHashes = {}; const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.pollingIntervalMs; this._numConfirmations = _.isUndefined(config) ? DEFAULT_NUM_CONFIRMATIONS -- cgit