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) => {