From a1b0fe65b7f00caf8078cc73cfe58b279c552cf8 Mon Sep 17 00:00:00 2001 From: Yaco 0x Date: Fri, 25 Oct 2024 19:06:30 +0200 Subject: [PATCH] fix: use Promise.all during pledging for dispute --- packages/automated-dispute/src/services/eboActor.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/automated-dispute/src/services/eboActor.ts b/packages/automated-dispute/src/services/eboActor.ts index 17dc71c..db2c4d3 100644 --- a/packages/automated-dispute/src/services/eboActor.ts +++ b/packages/automated-dispute/src/services/eboActor.ts @@ -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 { @@ -836,10 +836,6 @@ export class EboActor { } })(), ]); - - operations.forEach((element) => { - if (element.status === "rejected") throw element.reason; - }); } else await this.pledgeAgainst(request, dispute); }