From 0f622a8cbe2ebc5629e3bf7250ed2f48e7423261 Mon Sep 17 00:00:00 2001 From: Aaron Sutula Date: Fri, 30 Aug 2019 18:46:28 -0500 Subject: [PATCH] Migration fix (#1326) * migrate onboarded and initialized state Signed-off-by: Aaron Sutula * Bump migration version Signed-off-by: Aaron Sutula --- App/Redux/RootReducer.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/App/Redux/RootReducer.ts b/App/Redux/RootReducer.ts index 7ab8fa2a7..59cdabe07 100644 --- a/App/Redux/RootReducer.ts +++ b/App/Redux/RootReducer.ts @@ -367,14 +367,21 @@ const migrations: MigrationManifest = { return rest }, 24: persistedState => { - // Move onboarded from preferences to initialization const state = persistedState as any const { onboarded, ...restPreferences } = state.preferences const { initialized, ...restAccount } = state.account return { ...state, account: restAccount, - preferences: restPreferences + preferences: restPreferences, + initialization: { + onboarding: { + completed: onboarded + }, + instance: { + state: 'initialized' + } + } } } } @@ -382,7 +389,7 @@ const migrations: MigrationManifest = { const persistConfig: PersistConfig = { key: 'primary', storage: AsyncStorage, - version: 23, + version: 24, whitelist: [ 'account', 'preferences',