aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-11-13 01:26:57 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-11-13 09:06:13 +0800
commitbcad937003fa925878d34e5fa83e5a89369d0957 (patch)
treee902fc46a5e1083da94d4db292005097627178a2 /src
parent53c918cc785ee3769103acc3e15aa9275c9383d9 (diff)
downloaddexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar.gz
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar.bz2
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar.lz
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar.xz
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.tar.zst
dexon-sol-tools-bcad937003fa925878d34e5fa83e5a89369d0957.zip
Fix last merge conflicts
Diffstat (limited to 'src')
-rw-r--r--src/order_watcher/order_state_watcher.ts16
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]);
}