From c52b4148beac70f08c297f65e9d40c227cc15e75 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Fri, 22 Apr 2022 11:12:30 +0530 Subject: [PATCH 1/4] hide the billing card in payment methods --- src/pages/settings/Payments/PaymentMethodList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index 47145e22ac92..11d17fc910bf 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -117,7 +117,11 @@ class PaymentMethodList extends Component { * @returns {Array} */ getFilteredPaymentMethods() { - let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, this.props.cardList, this.props.payPalMeUsername, this.props.userWallet); + + //filter non-billing cards + const filteredCardList = _.filter(this.props.cardList, (card) => !card.additionalData.isBillingCard); + + let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, filteredCardList, this.props.payPalMeUsername, this.props.userWallet); if (!_.isEmpty(this.props.filterType)) { combinedPaymentMethods = _.filter(combinedPaymentMethods, paymentMethod => paymentMethod.accountType === this.props.filterType); From 55049de1e601df6a24995ab86a806d3fca055a49 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Fri, 22 Apr 2022 11:53:33 +0530 Subject: [PATCH 2/4] fixed linter issue --- src/pages/settings/Payments/PaymentMethodList.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index 11d17fc910bf..6fbcae309a20 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -118,8 +118,8 @@ class PaymentMethodList extends Component { */ getFilteredPaymentMethods() { - //filter non-billing cards - const filteredCardList = _.filter(this.props.cardList, (card) => !card.additionalData.isBillingCard); + // filter non-billing cards + const filteredCardList = _.filter(this.props.cardList, card => !card.additionalData.isBillingCard); let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, filteredCardList, this.props.payPalMeUsername, this.props.userWallet); From 527f086b3a1e24be673f62ea04ad3c2b7954bbc7 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Fri, 22 Apr 2022 12:02:16 +0530 Subject: [PATCH 3/4] fixed linter issue --- src/pages/settings/Payments/PaymentMethodList.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index 6fbcae309a20..7b61ad8513fb 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -117,7 +117,6 @@ class PaymentMethodList extends Component { * @returns {Array} */ getFilteredPaymentMethods() { - // filter non-billing cards const filteredCardList = _.filter(this.props.cardList, card => !card.additionalData.isBillingCard); From 01343be7d9922136a8b9154dd7c433c9e5038925 Mon Sep 17 00:00:00 2001 From: Vivek Kumar Date: Fri, 22 Apr 2022 20:31:09 +0530 Subject: [PATCH 4/4] added proper comment --- src/pages/settings/Payments/PaymentMethodList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index 7b61ad8513fb..f748259fd63a 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -117,7 +117,7 @@ class PaymentMethodList extends Component { * @returns {Array} */ getFilteredPaymentMethods() { - // filter non-billing cards + // Hide the billing card from the payments menu for now because you can't make it your default method, or delete it const filteredCardList = _.filter(this.props.cardList, card => !card.additionalData.isBillingCard); let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, filteredCardList, this.props.payPalMeUsername, this.props.userWallet);