diff options
author | Jacob Evans <dekz@dekz.net> | 2017-11-23 11:37:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-23 11:37:34 +0800 |
commit | 437ac301db3c03c0abd0f741a17c56a4eebc2aa4 (patch) | |
tree | 2bd3276289578e99140f8f1168af58f07d566476 /packages/0x.js/src/order_watcher/event_watcher.ts | |
parent | 9c9ce9752537122df51b935bf1f63f128414fc0f (diff) | |
parent | 215740fab27d75630f55e7a3194b9e498b511c08 (diff) | |
download | dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.gz dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.tar.zst dexon-sol-tools-437ac301db3c03c0abd0f741a17c56a4eebc2aa4.zip |
Merge branch 'development' into feature/calculate-remaining-proportions
Diffstat (limited to 'packages/0x.js/src/order_watcher/event_watcher.ts')
-rw-r--r-- | packages/0x.js/src/order_watcher/event_watcher.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/0x.js/src/order_watcher/event_watcher.ts b/packages/0x.js/src/order_watcher/event_watcher.ts index 81529a98c..ecbab0cd5 100644 --- a/packages/0x.js/src/order_watcher/event_watcher.ts +++ b/packages/0x.js/src/order_watcher/event_watcher.ts @@ -12,7 +12,7 @@ import {intervalUtils} from '../utils/interval_utils'; import {assert} from '../utils/assert'; import {utils} from '../utils/utils'; -const DEFAULT_EVENT_POLLING_INTERVAL = 200; +const DEFAULT_EVENT_POLLING_INTERVAL_MS = 200; enum LogEventState { Removed, @@ -28,11 +28,11 @@ export class EventWatcher { private _pollingIntervalMs: number; private _intervalIdIfExists?: NodeJS.Timer; private _lastEvents: Web3.LogEntry[] = []; - constructor(web3Wrapper: Web3Wrapper, pollingIntervalMs: undefined|number) { + constructor(web3Wrapper: Web3Wrapper, pollingIntervalIfExistsMs: undefined|number) { this._web3Wrapper = web3Wrapper; - this._pollingIntervalMs = _.isUndefined(pollingIntervalMs) ? - DEFAULT_EVENT_POLLING_INTERVAL : - pollingIntervalMs; + this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs) ? + DEFAULT_EVENT_POLLING_INTERVAL_MS : + pollingIntervalIfExistsMs; } public subscribe(callback: EventWatcherCallback): void { assert.isFunction('callback', callback); @@ -81,7 +81,7 @@ export class EventWatcher { ...log, }; if (!_.isUndefined(this._intervalIdIfExists)) { - await callback(logEvent); + callback(logEvent); } } } |