Skip to content

Commit

Permalink
fix: use Promise.all during pledging for dispute
Browse files Browse the repository at this point in the history
  • Loading branch information
0xyaco committed Oct 25, 2024
1 parent 913649c commit a1b0fe6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/automated-dispute/src/services/eboActor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ export class EboActor {
const isValidDispute = await this.isValidDispute(request, proposedResponse);

if (isValidDispute) {
const operations = await Promise.allSettled([
await Promise.all([
this.pledgeFor(request, dispute),
(async () => {
try {
Expand All @@ -836,10 +836,6 @@ export class EboActor {
}
})(),
]);

operations.forEach((element) => {
if (element.status === "rejected") throw element.reason;
});
} else await this.pledgeAgainst(request, dispute);
}

Expand Down

0 comments on commit a1b0fe6

Please sign in to comment.