Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes P2P debit card option #46323

Merged
merged 10 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/components/AddPaymentMethodMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,14 @@ function AddPaymentMethodMenu({
},
]
: []),
...[
{
text: translate('common.debitCard'),
icon: Expensicons.CreditCard,
onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
},
],
// Adding a debit card for P2P payments is temporarily disabled
// ...[
// {
// text: translate('common.debitCard'),
// icon: Expensicons.CreditCard,
// onSelected: () => onItemSelected(CONST.PAYMENT_METHODS.DEBIT_CARD),
// },
// ],
]}
withoutOverlay
/>
Expand Down
4 changes: 4 additions & 0 deletions src/pages/settings/Wallet/AddDebitCardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
import useLocalize from '@hooks/useLocalize';
import usePrevious from '@hooks/usePrevious';
import Navigation from '@libs/Navigation/Navigation';
import * as PaymentMethods from '@userActions/PaymentMethods';

Check failure on line 10 in src/pages/settings/Wallet/AddDebitCardPage.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Insert `NotFoundPage·from·'@pages/ErrorPage/NotFoundPage';⏎import·`
import ONYXKEYS from '@src/ONYXKEYS';

Check failure on line 11 in src/pages/settings/Wallet/AddDebitCardPage.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Delete `';⏎import·NotFoundPage·from·'@pages/ErrorPage/NotFoundPage`
import NotFoundPage from '@pages/ErrorPage/NotFoundPage';

function DebitCardPage() {
// Temporarily disabled
return <NotFoundPage />;

const {translate} = useLocalize();
const [formData] = useOnyx(ONYXKEYS.FORMS.ADD_PAYMENT_CARD_FORM);
const prevFormDataSetupComplete = usePrevious(!!formData?.setupComplete);
Expand Down
4 changes: 3 additions & 1 deletion src/pages/settings/Wallet/PaymentMethodList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,12 @@
return assignedCardsGrouped;
}

const paymentCardList = fundList ?? {};

Check failure on line 263 in src/pages/settings/Wallet/PaymentMethodList.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

'paymentCardList' is assigned a value but never used

// Hide any billing cards that are not P2P debit cards for now because you cannot make them your default method, or delete them
const filteredCardList = Object.values(paymentCardList).filter((card) => !!card.accountData?.additionalData?.isP2PDebitCard);
// All payment cards are temporarily disabled for use as a payment method
// const filteredCardList = Object.values(paymentCardList).filter((card) => !!card.accountData?.additionalData?.isP2PDebitCard);
const filteredCardList = {};
let combinedPaymentMethods = PaymentUtils.formatPaymentMethods(bankAccountList ?? {}, filteredCardList, styles);

if (filterType !== '') {
Expand Down
Loading