Remove duplicate shouldSavePaymentMethod selector (https://github.com/woocommerce/woocommerce-blocks/pull/7381)

This commit is contained in:
Alex Florisca 2022-10-19 12:48:04 +01:00 committed by GitHub
parent 8b17d35bb8
commit 48c450c469
3 changed files with 2 additions and 6 deletions

View File

@ -86,7 +86,7 @@ const CheckoutProcessor = () => {
paymentMethodData: store.getPaymentMethodData(),
isExpressPaymentMethodActive: store.isExpressPaymentMethodActive(),
currentPaymentStatus: store.getCurrentStatus(),
shouldSavePayment: store.shouldSavePaymentMethod(),
shouldSavePayment: store.getShouldSavePaymentMethod(),
};
}, [] );

View File

@ -30,7 +30,7 @@ const PaymentMethodCard = ( { children, showSaveOption } ) => {
const checkoutStore = select( CHECKOUT_STORE_KEY );
return {
shouldSavePaymentMethod:
paymentMethodStore.shouldSavePaymentMethod(),
paymentMethodStore.getShouldSavePaymentMethod(),
customerId: checkoutStore.getCustomerId(),
};
} );

View File

@ -63,10 +63,6 @@ export const getActiveSavedPaymentMethods = (
);
};
export const shouldSavePaymentMethod = ( state: PaymentMethodDataState ) => {
return state.shouldSavePaymentMethod;
};
export const paymentMethodsInitialized = ( state: PaymentMethodDataState ) => {
return state.paymentMethodsInitialized;
};