diff --git a/src/jumpstart/slice.ts b/src/jumpstart/slice.ts index 342806dcb34..156932dfe05 100644 --- a/src/jumpstart/slice.ts +++ b/src/jumpstart/slice.ts @@ -1,4 +1,6 @@ import { PayloadAction, createSlice } from '@reduxjs/toolkit' +import { REHYDRATE, RehydrateAction } from 'redux-persist' +import { getRehydratePayload } from 'src/redux/persist-helper' import { TokenBalance } from 'src/tokens/slice' import { NetworkId, TokenAmount } from 'src/transactions/types' import { SerializableTransactionRequest } from 'src/viem/preparedTransactionSerialization' @@ -119,6 +121,15 @@ const slice = createSlice({ introHasBeenSeen: true, }), }, + extraReducers: (builder) => { + builder.addCase(REHYDRATE, (state, action: RehydrateAction) => ({ + ...state, + ...getRehydratePayload(action, 'jumpstart'), + claimStatus: 'idle', + depositStatus: 'idle', + reclaimStatus: 'idle', + })) + }, }) export const { diff --git a/src/redux/store.ts b/src/redux/store.ts index 5eabff92413..253548891c6 100644 --- a/src/redux/store.ts +++ b/src/redux/store.ts @@ -27,14 +27,7 @@ const persistConfig: PersistConfig = { version: 237, keyPrefix: `reduxStore-`, // the redux-persist default is `persist:` which doesn't work with some file systems. storage: FSStorage(), - blacklist: [ - 'networkInfo', - 'alert', - 'imports', - 'keylessBackup', - 'jumpstart', - transactionFeedV2Api.reducerPath, - ], + blacklist: ['networkInfo', 'alert', 'imports', 'keylessBackup', transactionFeedV2Api.reducerPath], stateReconciler: autoMergeLevel2, migrate: async (...args) => { const migrate = createMigrate(migrations)