diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -1274,7 +1274,11 @@ }; }, [74]: (state: AppState) => - unshimClientDB(state, [messageTypes.UPDATE_RELATIONSHIP]), + unshimClientDB( + state, + [messageTypes.UPDATE_RELATIONSHIP], + handleReduxMigrationFailure, + ), }; type PersistedReportStore = $Diff< diff --git a/native/redux/unshim-utils.js b/native/redux/unshim-utils.js --- a/native/redux/unshim-utils.js +++ b/native/redux/unshim-utils.js @@ -10,7 +10,6 @@ import type { RawMessageInfo } from 'lib/types/message-types.js'; import { translateClientDBMessageInfoToRawMessageInfo } from 'lib/utils/message-ops-utils.js'; -import { handleReduxMigrationFailure } from './handle-redux-migration-failure.js'; import type { AppState } from './state-types.js'; import { commCoreModule } from '../native-modules.js'; @@ -22,6 +21,7 @@ function unshimClientDB( state: AppState, unshimTypes: $ReadOnlyArray, + handleMigrationFailure?: AppState => AppState, ): AppState { // 1. Get messages from SQLite `messages` table. const clientDBMessageInfos = commCoreModule.getAllMessagesSync(); @@ -66,7 +66,10 @@ }; } catch (exception) { console.log(exception); - return handleReduxMigrationFailure(state); + if (handleMigrationFailure) { + return handleMigrationFailure(state); + } + return ({ ...state, cookie: null }: any); } }