diff options
author | Fabio Berger <me@fabioberger.com> | 2017-11-10 05:59:41 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2017-11-10 05:59:41 +0800 |
commit | 126a165f558326625d892c4a379c0ebd66088c9a (patch) | |
tree | ac7b872b3cd84e0fcb650845eae08bf40c841f50 /src/order_watcher | |
parent | 6f5a55b5fe4c6f0f56303b6ac5dcbd99129ee7bd (diff) | |
download | dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar.gz dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar.bz2 dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar.lz dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar.xz dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.tar.zst dexon-sol-tools-126a165f558326625d892c4a379c0ebd66088c9a.zip |
Add nested config for orderWatcher
Diffstat (limited to 'src/order_watcher')
-rw-r--r-- | src/order_watcher/order_state_watcher.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/order_watcher/order_state_watcher.ts b/src/order_watcher/order_state_watcher.ts index e31fc962d..14b5b6cf9 100644 --- a/src/order_watcher/order_state_watcher.ts +++ b/src/order_watcher/order_state_watcher.ts @@ -15,6 +15,7 @@ import { BlockParamLiteral, LogWithDecodedArgs, OnOrderStateChangeCallback, + OrderStateWatcherConfig, ExchangeEvents, TokenEvents, ZeroExError, @@ -41,10 +42,11 @@ export class OrderStateWatcher { private _orderStateUtils: OrderStateUtils; constructor( web3Wrapper: Web3Wrapper, abiDecoder: AbiDecoder, orderStateUtils: OrderStateUtils, - eventPollingIntervalMs?: number) { + config?: OrderStateWatcherConfig) { this._web3Wrapper = web3Wrapper; this._orders = {}; this._dependentOrderHashes = {}; + const eventPollingIntervalMs = _.isUndefined(config) ? undefined : config.pollingIntervalMs; this._eventWatcher = new EventWatcher( this._web3Wrapper, eventPollingIntervalMs, ); |