Fix last merge conflicts

This commit is contained in:
Leonid Logvinov
2017-11-12 12:26:57 -05:00
parent 53c918cc78
commit bcad937003

View File

@@ -68,13 +68,7 @@ export class OrderStateWatcher {
web3Wrapper: Web3Wrapper, abiDecoder: AbiDecoder, token: TokenWrapper, exchange: ExchangeWrapper, web3Wrapper: Web3Wrapper, abiDecoder: AbiDecoder, token: TokenWrapper, exchange: ExchangeWrapper,
config?: OrderStateWatcherConfig, config?: OrderStateWatcherConfig,
) { ) {
<<<<<<< HEAD this._orderByOrderHash = {};
const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.pollingIntervalMs;
this._numConfirmations = _.isUndefined(config) ?
DEFAULT_NUM_CONFIRMATIONS
: config.numConfirmations;
=======
this._orders = {};
this._abiDecoder = abiDecoder; this._abiDecoder = abiDecoder;
this._token = token; this._token = token;
this._exchange = exchange; this._exchange = exchange;
@@ -82,10 +76,6 @@ export class OrderStateWatcher {
this._dependentOrderHashes = {}; this._dependentOrderHashes = {};
const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs; const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs;
const blockPollingIntervalMs = _.isUndefined(config) ? undefined : config.blockPollingIntervalMs; 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( this._eventWatcher = new EventWatcher(
web3Wrapper, eventPollingIntervalMs, this._numConfirmations, web3Wrapper, eventPollingIntervalMs, this._numConfirmations,
); );
@@ -202,7 +192,7 @@ export class OrderStateWatcher {
this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash); this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash);
// Revalidate orders // Revalidate orders
const orderHash = args.orderHash; const orderHash = args.orderHash;
const isOrderWatched = !_.isUndefined(this._orders[orderHash]); const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
if (isOrderWatched) { if (isOrderWatched) {
await this._emitRevalidateOrdersAsync([orderHash]); await this._emitRevalidateOrdersAsync([orderHash]);
} }
@@ -216,7 +206,7 @@ export class OrderStateWatcher {
this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash); this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash);
// Revalidate orders // Revalidate orders
const orderHash = args.orderHash; const orderHash = args.orderHash;
const isOrderWatched = !_.isUndefined(this._orders[orderHash]); const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
if (isOrderWatched) { if (isOrderWatched) {
await this._emitRevalidateOrdersAsync([orderHash]); await this._emitRevalidateOrdersAsync([orderHash]);
} }