aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/order_watcher/order_watcher.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-17 18:04:29 +0800
committerFabio Berger <me@fabioberger.com>2018-07-17 18:04:29 +0800
commit1e787a764615bd3df839f2cb117b711be297b9d5 (patch)
tree43a61a3a8b75b3f69428525fb4ec3a9d97d46b18 /packages/order-watcher/src/order_watcher/order_watcher.ts
parent766ac3f1febcb6f6e4f6c20198283f01b278f671 (diff)
downloaddexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar.gz
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar.bz2
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar.lz
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar.xz
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.tar.zst
dexon-sol-tools-1e787a764615bd3df839f2cb117b711be297b9d5.zip
Remove stateLayer OrderWatcher config and instead temporarily hard-code until we get pending block to work with Blockstream
Diffstat (limited to 'packages/order-watcher/src/order_watcher/order_watcher.ts')
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index b09ba8d9d..95671684f 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -61,6 +61,7 @@ interface OrderStateByOrderHash {
// tslint:disable-next-line:custom-no-magic-numbers
const DEFAULT_CLEANUP_JOB_INTERVAL_MS = 1000 * 60 * 60; // 1h
+const STATE_LAYER = BlockParamLiteral.Latest;
/**
* This class includes all the functionality related to watching a set of orders
@@ -91,17 +92,15 @@ export class OrderWatcher {
});
this._contractWrappers = new ContractWrappers(provider, { networkId });
const pollingIntervalIfExistsMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs;
- const stateLayer =
- _.isUndefined(config) || _.isUndefined(config.stateLayer) ? BlockParamLiteral.Latest : config.stateLayer;
const isVerbose = !_.isUndefined(config) && !_.isUndefined(config.isVerbose) ? config.isVerbose : false;
- this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, stateLayer, isVerbose);
+ this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, STATE_LAYER, isVerbose);
this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
this._contractWrappers.token,
- stateLayer,
+ STATE_LAYER,
);
this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(
this._contractWrappers.exchange,
- stateLayer,
+ STATE_LAYER,
);
this._orderStateUtils = new OrderStateUtils(
this._balanceAndProxyAllowanceLazyStore,