diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 01:26:57 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 09:06:13 +0800 |
commit | bcad937003fa925878d34e5fa83e5a89369d0957 (patch) | |
tree | e902fc46a5e1083da94d4db292005097627178a2 | |
parent | 53c918cc785ee3769103acc3e15aa9275c9383d9 (diff) | |
download | dexon-0x-contracts-bcad937003fa925878d34e5fa83e5a89369d0957.tar.gz dexon-0x-contracts-bcad937003fa925878d34e5fa83e5a89369d0957.tar.zst dexon-0x-contracts-bcad937003fa925878d34e5fa83e5a89369d0957.zip |
Fix last merge conflicts
-rw-r--r-- | src/order_watcher/order_state_watcher.ts | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/order_watcher/order_state_watcher.ts b/src/order_watcher/order_state_watcher.ts index a19d6be9c..59de1cc2f 100644 --- a/src/order_watcher/order_state_watcher.ts +++ b/src/order_watcher/order_state_watcher.ts @@ -68,13 +68,7 @@ export class OrderStateWatcher { web3Wrapper: Web3Wrapper, abiDecoder: AbiDecoder, token: TokenWrapper, exchange: ExchangeWrapper, config?: OrderStateWatcherConfig, ) { -<<<<<<< HEAD - const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.pollingIntervalMs; - this._numConfirmations = _.isUndefined(config) ? - DEFAULT_NUM_CONFIRMATIONS - : config.numConfirmations; -======= - this._orders = {}; + this._orderByOrderHash = {}; this._abiDecoder = abiDecoder; this._token = token; this._exchange = exchange; @@ -82,10 +76,6 @@ export class OrderStateWatcher { this._dependentOrderHashes = {}; const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs; const blockPollingIntervalMs = _.isUndefined(config) ? undefined : config.blockPollingIntervalMs; - this._numConfirmations = (_.isUndefined(config) || _.isUndefined(config.numConfirmations)) ? - DEFAULT_NUM_CONFIRMATIONS : - config.numConfirmations; ->>>>>>> Clear store cache on events this._eventWatcher = new EventWatcher( web3Wrapper, eventPollingIntervalMs, this._numConfirmations, ); @@ -202,7 +192,7 @@ export class OrderStateWatcher { this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash); // Revalidate orders const orderHash = args.orderHash; - const isOrderWatched = !_.isUndefined(this._orders[orderHash]); + const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]); if (isOrderWatched) { await this._emitRevalidateOrdersAsync([orderHash]); } @@ -216,7 +206,7 @@ export class OrderStateWatcher { this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash); // Revalidate orders const orderHash = args.orderHash; - const isOrderWatched = !_.isUndefined(this._orders[orderHash]); + const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]); if (isOrderWatched) { await this._emitRevalidateOrdersAsync([orderHash]); } |