Skip to content

Commit

Permalink
show cash when it's a card transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Nodebrute committed Jun 3, 2024
1 parent d7fd40a commit ac77271
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function MoneyRequestPreviewContent({
const isFullySettled = isSettled && !isSettlementOrApprovalPartial;
const isFullyApproved = ReportUtils.isReportApproved(iouReport) && !isSettlementOrApprovalPartial;
const shouldShowRBR = hasNoticeTypeViolations || hasViolations || hasFieldErrors || (!isFullySettled && !isFullyApproved && isOnHold);

const showCashOrCard = isCardTransaction ? translate('iou.card') : translate('iou.cash');
/*
Show the merchant for IOUs and expenses only if:
- the merchant is not empty, is custom, or is not related to scanning smartscan;
Expand Down Expand Up @@ -141,7 +141,7 @@ function MoneyRequestPreviewContent({
};

const getPreviewHeaderText = (): string => {
let message = translate('iou.cash');
let message = showCashOrCard;

if (isDistanceRequest) {
message = translate('common.distance');
Expand Down Expand Up @@ -372,7 +372,7 @@ function MoneyRequestPreviewContent({
onPressOut={() => ControlSelection.unblock()}
onLongPress={showContextMenu}
shouldUseHapticsOnLongPress
accessibilityLabel={isBillSplit ? translate('iou.split') : translate('iou.cash')}
accessibilityLabel={isBillSplit ? translate('iou.split') : showCashOrCard}
accessibilityHint={CurrencyUtils.convertToDisplayString(requestAmount, requestCurrency)}
style={[
styles.moneyRequestPreviewBox,
Expand Down

0 comments on commit ac77271

Please sign in to comment.