aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index b67fd33ac..ee0b2696f 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -199,9 +199,10 @@ export class ExchangeWrapper extends ContractWrapper {
this.exchangeLogEventObjs.push(logEventObj);
}
private async stopWatchingExchangeLogEventsAsync() {
- for (const logEventObj of this.exchangeLogEventObjs) {
- await promisify(logEventObj.stopWatching, logEventObj)();
- }
+ const stopWatchingPromises = _.map(this.exchangeLogEventObjs, logEventObj => {
+ return promisify(logEventObj.stopWatching, logEventObj)();
+ });
+ await Promise.all(stopWatchingPromises);
this.exchangeLogEventObjs = [];
}
private async validateFillOrderAndThrowIfInvalidAsync(signedOrder: SignedOrder,