aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-11-11 22:57:45 +0800
committerFabio Berger <me@fabioberger.com>2017-11-11 22:57:45 +0800
commit037e992de457fc9f5012576719470d6b4f2b118d (patch)
tree764f349b08e3ffce5047af495b679eb43ed6320a /src
parent12023073f43ad431a9acb5f28bb0a9abea4ab089 (diff)
downloaddexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar.gz
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar.bz2
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar.lz
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar.xz
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.tar.zst
dexon-sol-tools-037e992de457fc9f5012576719470d6b4f2b118d.zip
establish convention of initializing empty instances in instance declaration
Diffstat (limited to 'src')
-rw-r--r--src/order_watcher/order_state_watcher.ts6
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