diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-11 22:57:45 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-11 22:57:45 +0800 |
commit | 037e992de457fc9f5012576719470d6b4f2b118d (patch) | |
tree | 764f349b08e3ffce5047af495b679eb43ed6320a | |
parent | 12023073f43ad431a9acb5f28bb0a9abea4ab089 (diff) | |
download | dexon-0x-contracts-037e992de457fc9f5012576719470d6b4f2b118d.tar.gz dexon-0x-contracts-037e992de457fc9f5012576719470d6b4f2b118d.tar.zst dexon-0x-contracts-037e992de457fc9f5012576719470d6b4f2b118d.zip |
establish convention of initializing empty instances in instance declaration
-rw-r--r-- | src/order_watcher/order_state_watcher.ts | 6 |
1 files 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 |