Remove duplicate shouldSavePaymentMethod selector (https://github.com/woocommerce/woocommerce-blocks/pull/7381)
This commit is contained in:
parent
8b17d35bb8
commit
48c450c469
|
@ -86,7 +86,7 @@ const CheckoutProcessor = () => {
|
||||||
paymentMethodData: store.getPaymentMethodData(),
|
paymentMethodData: store.getPaymentMethodData(),
|
||||||
isExpressPaymentMethodActive: store.isExpressPaymentMethodActive(),
|
isExpressPaymentMethodActive: store.isExpressPaymentMethodActive(),
|
||||||
currentPaymentStatus: store.getCurrentStatus(),
|
currentPaymentStatus: store.getCurrentStatus(),
|
||||||
shouldSavePayment: store.shouldSavePaymentMethod(),
|
shouldSavePayment: store.getShouldSavePaymentMethod(),
|
||||||
};
|
};
|
||||||
}, [] );
|
}, [] );
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ const PaymentMethodCard = ( { children, showSaveOption } ) => {
|
||||||
const checkoutStore = select( CHECKOUT_STORE_KEY );
|
const checkoutStore = select( CHECKOUT_STORE_KEY );
|
||||||
return {
|
return {
|
||||||
shouldSavePaymentMethod:
|
shouldSavePaymentMethod:
|
||||||
paymentMethodStore.shouldSavePaymentMethod(),
|
paymentMethodStore.getShouldSavePaymentMethod(),
|
||||||
customerId: checkoutStore.getCustomerId(),
|
customerId: checkoutStore.getCustomerId(),
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -63,10 +63,6 @@ export const getActiveSavedPaymentMethods = (
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const shouldSavePaymentMethod = ( state: PaymentMethodDataState ) => {
|
|
||||||
return state.shouldSavePaymentMethod;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const paymentMethodsInitialized = ( state: PaymentMethodDataState ) => {
|
export const paymentMethodsInitialized = ( state: PaymentMethodDataState ) => {
|
||||||
return state.paymentMethodsInitialized;
|
return state.paymentMethodsInitialized;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue