1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/app/scripts
Olusegun Akintayo 086a7d0483
Keep memstore contents after service worker restarts (#15913)
* Add all controllers in memstore to store
Add methods to controller to reset memstore
Reset memstore when popup or tab is closed.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* When profile is loaded, set isFirstTime to true..
After resetting the controllers, set the flag to false.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove console.logs

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* For some reason programmatically computing the store is not working.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Proper check for browser.storage

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* do a list of rest methods instead of reset controllers.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Mock controller resetStates and localstore get/set

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Comments about TLC

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* bind this.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* use globalThis instead of locastore to store first time state.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Test to check that resetStates is not called a second time

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Set init state in GasFeeController and other controllers so that their
state is persisted accross SW restarts

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Revert localstore changes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* wrap the reset states changes in MV3 flag

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove localstore from metamask-controller

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Always reset state on MMController start in MV2.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Use relative path for import of isManifestV3

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit test

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-11-22 20:56:26 +04:00
..
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 Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
flask Add changes to support blocking Snaps by source shasum (#15830) 2022-09-23 18:56:46 +02:00
lib Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
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 Minor scripts/ui.js file cleanup (#16566) 2022-11-18 20:57:01 +07:00
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 Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
metamask-controller.test.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
sentry-install.js refactor sentryHooks object (#16435) 2022-11-09 19:28:32 +00:00
ui.js Use async/await for extension functions (#15722) 2022-11-21 08:51:11 -06:00