From 8872f7225e94ce11c5c03a393ca6004fbcd6411a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 11 Jul 2024 16:26:01 -0500 Subject: [PATCH] Let the async lock cook --- src/state/queries/labeler.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/state/queries/labeler.ts b/src/state/queries/labeler.ts index 8aeb2c1117..53e923a857 100644 --- a/src/state/queries/labeler.ts +++ b/src/state/queries/labeler.ts @@ -122,10 +122,7 @@ export function useLabelerSubscriptionMutation() { } } if (invalidLabelers.length) { - for (const did of invalidLabelers) { - // remove sequentially, not concurrently, due to prefs issues - await agent.removeLabeler(did) - } + await Promise.all(invalidLabelers.map(did => agent.removeLabeler(did))) } if (subscribe) {