aboutsummaryrefslogtreecommitdiffstats
path: root/src/order_watcher
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_watcher')
-rw-r--r--src/order_watcher/event_watcher.ts6
-rw-r--r--src/order_watcher/order_state_watcher.ts4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/order_watcher/event_watcher.ts b/src/order_watcher/event_watcher.ts
index 7d3719282..9ace32b29 100644
--- a/src/order_watcher/event_watcher.ts
+++ b/src/order_watcher/event_watcher.ts
@@ -1,7 +1,7 @@
import * as Web3 from 'web3';
import * as _ from 'lodash';
import {Web3Wrapper} from '../web3_wrapper';
-import {BlockParamLiteral, EventCallback, MempoolEventCallback} from '../types';
+import {BlockParamLiteral, EventCallback, EventWatcherCallback} from '../types';
import {AbiDecoder} from '../utils/abi_decoder';
import {intervalUtils} from '../utils/interval_utils';
@@ -12,14 +12,14 @@ export class EventWatcher {
private _pollingIntervalMs: number;
private _intervalId: NodeJS.Timer;
private _lastEvents: Web3.LogEntry[] = [];
- private _callbackAsync?: MempoolEventCallback;
+ private _callbackAsync?: EventWatcherCallback;
constructor(web3Wrapper: Web3Wrapper, pollingIntervalMs: undefined|number) {
this._web3Wrapper = web3Wrapper;
this._pollingIntervalMs = _.isUndefined(pollingIntervalMs) ?
DEFAULT_EVENT_POLLING_INTERVAL :
pollingIntervalMs;
}
- public subscribe(callback: MempoolEventCallback, numConfirmations: number): void {
+ public subscribe(callback: EventWatcherCallback, numConfirmations: number): void {
this._callbackAsync = callback;
this._intervalId = intervalUtils.setAsyncExcludingInterval(
this._pollForMempoolEventsAsync.bind(this, numConfirmations), this._pollingIntervalMs,
diff --git a/src/order_watcher/order_state_watcher.ts b/src/order_watcher/order_state_watcher.ts
index 8710c5a84..e31fc962d 100644
--- a/src/order_watcher/order_state_watcher.ts
+++ b/src/order_watcher/order_state_watcher.ts
@@ -90,7 +90,7 @@ export class OrderStateWatcher {
throw new Error(ZeroExError.SubscriptionAlreadyPresent);
}
this._callbackAsync = callback;
- this._eventWatcher.subscribe(this._onMempoolEventCallbackAsync.bind(this), numConfirmations);
+ this._eventWatcher.subscribe(this._onEventWatcherCallbackAsync.bind(this), numConfirmations);
}
/**
* Ends an orderStateWatcher subscription.
@@ -100,7 +100,7 @@ export class OrderStateWatcher {
delete this._callbackAsync;
this._eventWatcher.unsubscribe();
}
- private async _onMempoolEventCallbackAsync(log: LogEvent): Promise<void> {
+ private async _onEventWatcherCallbackAsync(log: LogEvent): Promise<void> {
const maybeDecodedLog = this._abiDecoder.tryToDecodeLogOrNoop(log);
const isDecodedLog = !_.isUndefined((maybeDecodedLog as LogWithDecodedArgs<any>).event);
if (!isDecodedLog) {