From d03755ded00843270f666315d8f1dd53e252ec34 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sat, 28 Jan 2023 02:16:03 +0100 Subject: [PATCH] Bots: Fix opening webapps and games (#2377) --- src/global/actions/api/bots.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/global/actions/api/bots.ts b/src/global/actions/api/bots.ts index 674494e58..c05d46ffc 100644 --- a/src/global/actions/api/bots.ts +++ b/src/global/actions/api/bots.ts @@ -575,10 +575,6 @@ addActionHandler('markBotTrusted', (global, actions, payload): ActionReturnType trustedBotIds: Array.from(newTrustedBotIds), }; - global = updateTabState(global, { - botTrustRequest: undefined, - }, tabId); - const tabState = selectTabState(global, tabId); if (tabState.botTrustRequest?.onConfirm) { const { action, payload: callbackPayload } = tabState.botTrustRequest.onConfirm; @@ -586,6 +582,10 @@ addActionHandler('markBotTrusted', (global, actions, payload): ActionReturnType actions[action](callbackPayload); } + global = updateTabState(global, { + botTrustRequest: undefined, + }, tabId); + setGlobal(global); });