Skip to content

Commit

Permalink
Merge pull request #8746 from Expensify/hide_billing_card
Browse files Browse the repository at this point in the history
Hide billing card in payment methods page
  • Loading branch information
techievivek authored Apr 22, 2022
2 parents 2038776 + 01343be commit bce4733
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/settings/Payments/PaymentMethodList.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ class PaymentMethodList extends Component {
* @returns {Array}
*/
getFilteredPaymentMethods() {
let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(this.props.bankAccountList, this.props.cardList, this.props.payPalMeUsername, this.props.userWallet);
// 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);

if (!_.isEmpty(this.props.filterType)) {
combinedPaymentMethods = _.filter(combinedPaymentMethods, paymentMethod => paymentMethod.accountType === this.props.filterType);
Expand Down

0 comments on commit bce4733

Please sign in to comment.