Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Fix race-condition bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioberger committed Apr 23, 2019
1 parent 600b86d commit 8d3ccf3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/order-watcher/src/order_watcher/order_watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ export class OrderWatcher {
private async _emitRevalidateOrdersAsync(orderHashes: string[], transactionHash?: string): Promise<void> {
for (const orderHash of orderHashes) {
const signedOrder = this._orderByOrderHash[orderHash];
if (signedOrder === undefined) {
continue;
}
// Most of these calls will never reach the network because the data is fetched from stores
// and only updated when cache is invalidated
const orderState = await this._orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
Expand Down

0 comments on commit 8d3ccf3

Please sign in to comment.