Skip to content

Commit

Permalink
virtual card # preview should display only ••••
Browse files Browse the repository at this point in the history
  • Loading branch information
grgia committed Jan 17, 2024
1 parent f341508 commit 4e9f199
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libs/CardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ function getYearFromExpirationDateString(expirationDateString: string) {
function formatCardExpiration(expirationDateString: string) {
// already matches MM/YY format
const dateFormat = /^\d{2}\/\d{4}$/;
if (dateFormat.test(expirationDateString)){
if (dateFormat.test(expirationDateString)) {
return expirationDateString;
}

const expirationMonth = getMonthFromExpirationDateString(expirationDateString);
const expirationYear = getYearFromExpirationDateString(expirationDateString);

return `${expirationMonth}/${expirationYear}`;
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Wallet/ExpensifyCardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function ExpensifyCardPage({
<>
<MenuItemWithTopDescription
description={translate('cardPage.virtualCardNumber')}
title={CardUtils.maskCard(virtualCard.lastFourPAN)}
title={CardUtils.maskCard('')}
interactive={false}
titleStyle={styles.walletCardNumber}
shouldShowRightComponent
Expand Down

0 comments on commit 4e9f199

Please sign in to comment.