diff --git a/src/libs/actions/PaymentMethods.js b/src/libs/actions/PaymentMethods.js index f6474b581cd9..5f995433e465 100644 --- a/src/libs/actions/PaymentMethods.js +++ b/src/libs/actions/PaymentMethods.js @@ -13,6 +13,8 @@ function getPaymentMethods() { return API.Get({ returnValueList: 'bankAccountList, cardList, userWallet, nameValuePairs', name: 'paypalMeAddress', + includeDeleted: false, + includeNotIssued: false, }) .then((response) => { Onyx.multiSet({ diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index c76ac9024f4e..7e62429e1f38 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -83,12 +83,17 @@ class PaymentMethodList extends Component { _.each(this.props.bankAccountList, (bankAccount) => { // Add all bank accounts besides the wallet if (bankAccount.type !== CONST.BANK_ACCOUNT_TYPES.WALLET) { + const formattedBankAccountNumber = bankAccount.accountNumber + ? `${this.props.translate('paymentMethodList.accountLastFour')} ${ + bankAccount.accountNumber.slice(-4) + }` + : null; combinedPaymentMethods.push({ type: MENU_ITEM, title: bankAccount.addressName, // eslint-disable-next-line - description: `${this.props.translate('paymentMethodList.accountLastFour')} ${bankAccount.accountNumber.slice(-4)}`, + description: formattedBankAccountNumber, icon: Bank, onPress: e => this.props.onPress(e, bankAccount.bankAccountID), key: `bankAccount-${bankAccount.bankAccountID}`, @@ -99,12 +104,15 @@ class PaymentMethodList extends Component { _.each(this.props.cardList, (card) => { // Add all cards besides the "cash" card if (card.cardName !== CONST.CARD_TYPES.DEFAULT_CASH) { + const formattedCardNumber = card.cardNumber + ? `${this.props.translate('paymentMethodList.cardLastFour')} ${card.cardNumber.slice(-4)}` + : null; combinedPaymentMethods.push({ type: MENU_ITEM, title: card.cardName, // eslint-disable-next-line - description: `${this.props.translate('paymentMethodList.cardLastFour')} ${card.cardNumber.slice(-4)}`, + description: formattedCardNumber, icon: CreditCard, onPress: e => this.props.onPress(e, card.cardID), key: `card-${card.cardID}`,