1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib
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
..
ens-ipfs Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
migrator remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
rpc-method-middleware migrate network constants to typescript (#15610) 2022-09-14 09:55:31 -05:00
segment Persisting segment events in MetaMetricsController store (#16198) 2022-11-08 04:33:03 +05:30
account-tracker.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
buy-url.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
buy-url.test.js Deprecating the Rinkeby, Ropsten, and Kovan test networks (#15989) 2022-09-28 20:26:01 -07:00
cleanErrorStack.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
cleanErrorStack.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
ComposableObservableStore.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
ComposableObservableStore.test.js Bump minimum Node.js version to 16 (#15131) 2022-07-02 23:32:18 -07:00
createLoggerMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
createMetaRPCHandler.js Persist state in metaRPCHandler so that we are sure state is persisted before sending back response to actions (#15978) 2022-10-10 17:10:44 -05:00
createMetaRPCHandler.test.js Remove nodeify (#13003) 2021-12-08 18:06:53 -03:30
createOnboardingMiddleware.js Deprecate extensionizer for webextension-polyfill (#13960) 2022-03-18 14:07:05 -05:00
createOriginMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
createRPCMethodTrackingMiddleware.js Increase provider rate limited to 5 minutes (#16308) 2022-10-31 15:24:01 -02:30
createRPCMethodTrackingMiddleware.test.js Fix Provider Tracking Metrics (#15082) 2022-07-20 08:25:04 -05:00
createStreamSink.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createTabIdMiddleware.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
decrypt-message-manager.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
encryption-public-key-manager.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
extractEthjsErrorMessage.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
get-first-preferred-lang-code.js ensure that we default users with browser language code 'zh' to the supported 'zh_CN' language code (#16329) 2022-10-31 16:48:51 -05:00
getObjStructure.js remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
local-store.js Persist state in metaRPCHandler so that we are sure state is persisted before sending back response to actions (#15978) 2022-10-10 17:10:44 -05:00
local-store.test.js Persist state in metaRPCHandler so that we are sure state is persisted before sending back response to actions (#15978) 2022-10-10 17:10:44 -05:00
message-manager.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
metaRPCClientFactory.js Remove related UI code from the app dir (#15384) 2022-09-16 14:05:21 -05:00
metaRPCClientFactory.test.js Fix rpc and tests (#15570) 2022-08-16 18:21:35 +05:30
network-store.js Persist state in metaRPCHandler so that we are sure state is persisted before sending back response to actions (#15978) 2022-10-10 17:10:44 -05:00
notification-manager.js Add JSDoc ESLint rules (#12112) 2022-01-07 12:27:33 -03:30
personal-message-manager.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
personal-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
seed-phrase-verifier.js Create constants for all keyring types (#16575) 2022-11-21 08:23:35 -06:00
seed-phrase-verifier.test.js Create constants for all keyring types (#16575) 2022-11-21 08:23:35 -06:00
sentry-filter-events.ts Fix Sentry deduplication of events that were never sent (#15677) 2022-08-23 16:14:14 -02:30
setupSentry.js Remove 3box feature and delete ThreeBoxController (#14571) 2022-10-31 13:50:50 -02:30
stream-utils.js Minor scripts/ui.js file cleanup (#16566) 2022-11-18 20:57:01 +07:00
typed-message-manager.js Keep memstore contents after service worker restarts (#15913) 2022-11-22 20:56:26 +04:00
typed-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
util.js MV3: Update service worker restart logic and keep-alive logic for dapp support (#16075) 2022-11-15 00:18:08 +07:00
util.test.js Use externally hosted phishing warning page 2022-05-16 14:40:50 -02:30