aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/order_watcher/order_state_watcher.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/order_watcher/order_state_watcher.ts')
-rw-r--r--packages/0x.js/src/order_watcher/order_state_watcher.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/0x.js/src/order_watcher/order_state_watcher.ts b/packages/0x.js/src/order_watcher/order_state_watcher.ts
index 9cccadb7f..fcf3c351d 100644
--- a/packages/0x.js/src/order_watcher/order_state_watcher.ts
+++ b/packages/0x.js/src/order_watcher/order_state_watcher.ts
@@ -76,6 +76,7 @@ export class OrderStateWatcher {
private _balanceAndProxyAllowanceLazyStore: BalanceAndProxyAllowanceLazyStore;
private _cleanupJobInterval: number;
private _cleanupJobIntervalIdIfExists?: NodeJS.Timer;
+ private _stateLayer: BlockParamLiteral;
constructor(
web3Wrapper: Web3Wrapper,
abiDecoder: AbiDecoder,
@@ -86,10 +87,13 @@ export class OrderStateWatcher {
this._abiDecoder = abiDecoder;
this._web3Wrapper = web3Wrapper;
const pollingIntervalIfExistsMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs;
- this._eventWatcher = new EventWatcher(web3Wrapper, pollingIntervalIfExistsMs);
+ this._stateLayer = _.isUndefined(config) || _.isUndefined(config.stateLayer)
+ ? BlockParamLiteral.Pending
+ : config.stateLayer;
+ this._eventWatcher = new EventWatcher(web3Wrapper, pollingIntervalIfExistsMs, this._stateLayer);
this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
token,
- BlockParamLiteral.Pending,
+ this._stateLayer,
);
this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(exchange);
this._orderStateUtils = new OrderStateUtils(