From 8a737de1163b2604bd5dab5a7c632a7550cf8d3c Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 17 Sep 2020 21:03:41 -0400 Subject: [PATCH] restore to enable_sync in client settings --- dist/bundle.es.js | 2 +- src/redux/middleware/shared-state.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index aa969c0..6a0b384 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -1815,7 +1815,7 @@ const buildSharedStateMiddleware = (actions, sharedStateFilters, sharedStateCb) const actionResult = next(action); // Call `getState` after calling `next` to ensure the state has updated in response to the action const nextState = getState(); - const syncEnabled = nextState.settings && nextState.settings.syncEnabledInWallet; + const syncEnabled = nextState.settings && nextState.settings.clientSettings && nextState.settings.clientSettings.enable_sync; const hasVerifiedEmail = nextState.user && nextState.user.user && nextState.user.user.has_verified_email; const preferenceKey = syncEnabled && hasVerifiedEmail ? 'shared' : 'local'; const shared = {}; diff --git a/src/redux/middleware/shared-state.js b/src/redux/middleware/shared-state.js index 272dbde..cb3a28d 100644 --- a/src/redux/middleware/shared-state.js +++ b/src/redux/middleware/shared-state.js @@ -26,7 +26,10 @@ export const buildSharedStateMiddleware = ( const actionResult = next(action); // Call `getState` after calling `next` to ensure the state has updated in response to the action const nextState: { user: any, settings: any } = getState(); - const syncEnabled = nextState.settings && nextState.settings.syncEnabledInWallet; + const syncEnabled = + nextState.settings && + nextState.settings.clientSettings && + nextState.settings.clientSettings.enable_sync; const hasVerifiedEmail = nextState.user && nextState.user.user && nextState.user.user.has_verified_email; const preferenceKey = syncEnabled && hasVerifiedEmail ? 'shared' : 'local';