diff --git a/modules/ppcp-settings/resources/js/data/common/actions.js b/modules/ppcp-settings/resources/js/data/common/actions.js index 63ace933b..edf6d8d4b 100644 --- a/modules/ppcp-settings/resources/js/data/common/actions.js +++ b/modules/ppcp-settings/resources/js/data/common/actions.js @@ -101,11 +101,9 @@ export const setClientSecret = ( clientSecret ) => ( { * @return {Action} The action. */ export const persist = function* () { - yield setIsBusy( true ); - yield { - type: ACTION_TYPES.DO_PERSIST_DATA, - }; - yield setIsBusy( false ); + const data = yield select( STORE_NAME ).persistentData(); + + yield { type: ACTION_TYPES.DO_PERSIST_DATA, data }; }; /** diff --git a/modules/ppcp-settings/resources/js/data/onboarding/actions.js b/modules/ppcp-settings/resources/js/data/onboarding/actions.js index 84bca8e1a..1742048e1 100644 --- a/modules/ppcp-settings/resources/js/data/onboarding/actions.js +++ b/modules/ppcp-settings/resources/js/data/onboarding/actions.js @@ -25,17 +25,6 @@ import { STORE_NAME } from './constants'; */ export const reset = () => ( { type: ACTION_TYPES.RESET } ); -/** - * Transient. Marks the onboarding details as "ready", i.e., fully initialized. - * - * @param {boolean} isReady - * @return {Action} The action. - */ -export const setIsReady = ( isReady ) => ( { - type: ACTION_TYPES.SET_TRANSIENT, - payload: { isReady }, -} ); - /** * Persistent. Set the full onboarding details, usually during app initialization. * @@ -47,6 +36,17 @@ export const hydrate = ( payload ) => ( { payload, } ); +/** + * Transient. Marks the onboarding details as "ready", i.e., fully initialized. + * + * @param {boolean} isReady + * @return {Action} The action. + */ +export const setIsReady = ( isReady ) => ( { + type: ACTION_TYPES.SET_TRANSIENT, + payload: { isReady }, +} ); + /** * Persistent.Set the "onboarding completed" flag which shows or hides the wizard. * @@ -69,50 +69,6 @@ export const setStep = ( step ) => ( { payload: { step }, } ); -/** - * Persistent. Sets the sandbox mode on or off. - * - * @param {boolean} useSandbox - * @return {Action} The action. - */ -export const setSandboxMode = ( useSandbox ) => ( { - type: ACTION_TYPES.SET_PERSISTENT, - payload: { useSandbox }, -} ); - -/** - * Persistent. Toggles the "Manual Connection" mode on or off. - * - * @param {boolean} useManualConnection - * @return {Action} The action. - */ -export const setManualConnectionMode = ( useManualConnection ) => ( { - type: ACTION_TYPES.SET_PERSISTENT, - payload: { useManualConnection }, -} ); - -/** - * Persistent. Changes the "client ID" value. - * - * @param {string} clientId - * @return {Action} The action. - */ -export const setClientId = ( clientId ) => ( { - type: ACTION_TYPES.SET_PERSISTENT, - payload: { clientId }, -} ); - -/** - * Persistent. Changes the "client secret" value. - * - * @param {string} clientSecret - * @return {Action} The action. - */ -export const setClientSecret = ( clientSecret ) => ( { - type: ACTION_TYPES.SET_PERSISTENT, - payload: { clientSecret }, -} ); - /** * Persistent. Sets the "isCasualSeller" value. *