1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 07:16:36 +01:00
metamask-extension/app/scripts
Mark Stacey 943453cfb2
Simplify MV3 initialization (#16559)
* Simplify MV3 initialization

The MV3 initialization logic was complicated and introduced race
difficult-to-reproduce race conditions when dapps connect during
initialization.

It seems that problems were encountered after the UI tried to connect
before the background was initialized. To address this, the
initialization step was _delayed_ until after the first connection.
That first connection was then passed into the initialization function,
and setup properly after initialization had begun.

However, this special treatment is only given for the first connection.
Subsequent connections that still occur during initialization would
fail. This also results in the initialization being needlessly delayed,
which is concerning given that our main performance goal is to speed it
up.

* Setup connect listeners before controller initialization

* Add comments

* Add comment explaining isInitialized step
2022-11-24 10:02:05 -03:30
..
account-import-strategies Bump keystone package versions to latest (#15878) 2022-09-22 10:04:24 -05:00
constants Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
controllers Remove callback from being saved in controller state (#16627) 2022-11-23 23:30:05 +05:30
flask Add changes to support blocking Snaps by source shasum (#15830) 2022-09-23 18:56:46 +02:00
lib Simplify MV3 initialization (#16559) 2022-11-24 10:02:05 -03:30
migrations Updating tokensChainsCache[chainId].data to object from array in user state (#16535) 2022-11-18 13:35:42 -05:00
platforms Use async/await for extension functions (#15722) 2022-11-21 08:51:11 -06:00
app-init.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
background.js Simplify MV3 initialization (#16559) 2022-11-24 10:02:05 -03:30
contentscript.js MV3: support Service Worker restart for phishing warning pages (#16488) 2022-11-17 22:22:52 +07:00
detect-multiple-instances.js Warn about multiple MetaMask instances running (#13836) 2022-04-27 20:14:10 +02:00
detect-multiple-instances.test.js Warn about multiple MetaMask instances running (#13836) 2022-04-27 20:14:10 +02:00
disable-console.js Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
first-time-state.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
init-globals.js MV3: fix injection of applyLavamoat variable in service worker (#14920) 2022-06-18 12:40:30 +05:30
inpage.js MV3: contentscript.js - re-activate streams when Service Worker terminates and then resets (#15494) 2022-09-13 14:20:08 -07:00
lockdown-more.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
lockdown-run.js lockdown - breakout making globalThis properties non-writable (#12258) 2021-10-01 08:53:12 -10:00
metamask-controller.actions.test.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
metamask-controller.js Fix #15050 - MV3: Keep the user logged in when service worker restarts (#15558) 2022-11-23 18:49:24 -06:00
metamask-controller.test.js Simplify MV3 initialization (#16559) 2022-11-24 10:02:05 -03:30
sentry-install.js refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
ui.js Fix #15050 - MV3: Keep the user logged in when service worker restarts (#15558) 2022-11-23 18:49:24 -06:00
use-snow.js Integrating snow into metamask (#15580) 2022-11-24 02:36:19 +02:00