From aacc71ce14d93c3b2f0838106353c0b52be4b5ad Mon Sep 17 00:00:00 2001 From: Cal Leung Date: Mon, 25 Oct 2021 20:10:04 -0700 Subject: [PATCH] Exclude PhishingController state from persist --- app/store/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/store/index.js b/app/store/index.js index 946543bbc54..984a380b044 100644 --- a/app/store/index.js +++ b/app/store/index.js @@ -56,7 +56,8 @@ const MigratedStorage = { */ const persistTransform = createTransform( (inboundState) => { - const { TokenListController, SwapsController, ...controllers } = inboundState.backgroundState || {}; + const { TokenListController, SwapsController, PhishingController, ...controllers } = + inboundState.backgroundState || {}; const { tokenList, tokensChainCache, ...persistedTokenListController } = TokenListController; const { aggregatorMetadata, @@ -68,6 +69,7 @@ const persistTransform = createTransform( topAssetsLastFetched, ...persistedSwapsController } = SwapsController; + const { phishing, whitelist, ...persistedPhishingController } = PhishingController; // Reconstruct data to persist const newState = { @@ -75,6 +77,7 @@ const persistTransform = createTransform( ...controllers, TokenListController: persistedTokenListController, SwapsController: persistedSwapsController, + PhishingController: persistedPhishingController, }, }; return newState;