1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Move updateBackgroundConnection call in ui/index.js to before the action calls (#15826)

This commit is contained in:
Dan J Miller 2022-09-14 13:05:02 -02:30 committed by seaona
parent 222c5debf3
commit 96a68019bf

View File

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