1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01: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 GitHub
parent 487440f93d
commit ba3a584d7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,8 @@ async function startApp(metamaskState, backgroundConnection, opts) {
}, },
}; };
updateBackgroundConnection(backgroundConnection);
if (getEnvironmentType() === ENVIRONMENT_TYPE_POPUP) { if (getEnvironmentType() === ENVIRONMENT_TYPE_POPUP) {
const { origin } = draftInitialState.activeTab; const { origin } = draftInitialState.activeTab;
const permittedAccountsForCurrentTab = const permittedAccountsForCurrentTab =
@ -161,8 +163,6 @@ async function startApp(metamaskState, backgroundConnection, opts) {
); );
} }
updateBackgroundConnection(backgroundConnection);
// global metamask api - used by tooling // global metamask api - used by tooling
global.metamask = { global.metamask = {
updateCurrentLocale: (code) => { updateCurrentLocale: (code) => {