♻️ Fix new implementation of controls

This commit is contained in:
Philipp Stracker 2024-11-20 16:53:21 +01:00
parent 90c6cd1e7d
commit a7b854abb5
No known key found for this signature in database

View file

@ -186,10 +186,12 @@ export const setProducts = ( products ) => {
* *
* @return {Action} The action. * @return {Action} The action.
*/ */
export const persist = () => { export const persist = function* () {
return { const data = yield select( STORE_NAME ).persistentData();
type: ACTION_TYPES.DO_PERSIST_DATA,
}; yield setIsSaving( true );
yield { type: ACTION_TYPES.DO_PERSIST_DATA, data };
yield setIsSaving( false );
}; };
/** /**
@ -197,8 +199,19 @@ export const persist = () => {
* *
* @return {Action} The action. * @return {Action} The action.
*/ */
export const connectViaIdAndSecret = () => { export const connectViaIdAndSecret = function* () {
return { const { clientId, clientSecret, useSandbox } =
yield select( STORE_NAME ).persistentData();
yield setManualConnectionIsBusy( true );
const result = yield {
type: ACTION_TYPES.DO_MANUAL_CONNECTION, type: ACTION_TYPES.DO_MANUAL_CONNECTION,
clientId,
clientSecret,
useSandbox,
}; };
yield setManualConnectionIsBusy( false );
return result;
}; };