From 68b7e1d484586e0048445c3cd0c3b1a787224ba5 Mon Sep 17 00:00:00 2001 From: Ajinkya Rajandekar <145996984+ajinkyaraj-23@users.noreply.github.com> Date: Thu, 13 Feb 2025 10:25:36 +0000 Subject: [PATCH] Blacklist following items from redux-persist reducer config to avoid saving them to localstorage. assets, annoucements, tokens , protocol settings These items need not be saved in localstorage. Errors can be sent to backend sentry. Update migration after removing the blacklisted keys. --- packages/state/src/migrations.ts | 2 ++ packages/state/src/reducer.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/state/src/migrations.ts b/packages/state/src/migrations.ts index e563a456db..1363d0ad91 100644 --- a/packages/state/src/migrations.ts +++ b/packages/state/src/migrations.ts @@ -80,6 +80,7 @@ export const mainStoreMigrations = { } } }), + 10: identity, } as any; export const accountsMigrations = { @@ -120,4 +121,5 @@ export const accountsMigrations = { }); }), 9: identity, + 10: identity, } as any; diff --git a/packages/state/src/reducer.ts b/packages/state/src/reducer.ts index 64c676eda6..806610f9fe 100644 --- a/packages/state/src/reducer.ts +++ b/packages/state/src/reducer.ts @@ -39,7 +39,7 @@ export const makeReducer = (storage_: Storage | undefined) => { key: "root", version: VERSION, storage, - blacklist: ["accounts"], + blacklist: ["accounts", "assets", "announcement", "tokens", "protocolSettings"], migrate: createAsyncMigrate(mainStoreMigrations, { debug: false }), };