From ba3a584d7f6eb0eea277a5a22766244b404bd3c7 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Wed, 14 Sep 2022 13:05:02 -0230 Subject: [PATCH] Move updateBackgroundConnection call in ui/index.js to before the action calls (#15826) --- ui/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/index.js b/ui/index.js index 1f258a817..5cac3b9b9 100644 --- a/ui/index.js +++ b/ui/index.js @@ -114,6 +114,8 @@ async function startApp(metamaskState, backgroundConnection, opts) { }, }; + updateBackgroundConnection(backgroundConnection); + if (getEnvironmentType() === ENVIRONMENT_TYPE_POPUP) { const { origin } = draftInitialState.activeTab; const permittedAccountsForCurrentTab = @@ -161,8 +163,6 @@ async function startApp(metamaskState, backgroundConnection, opts) { ); } - updateBackgroundConnection(backgroundConnection); - // global metamask api - used by tooling global.metamask = { updateCurrentLocale: (code) => {