Skip to content

Commit

Permalink
Merge pull request #42999 from Nodebrute/cardTransaction
Browse files Browse the repository at this point in the history
show card when it's a card transaction
  • Loading branch information
grgia authored Jun 13, 2024
2 parents e9799d9 + d75b9e9 commit fc6d67e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,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');
const shouldShowHoldMessage = !(isSettled && !isSettlementOrApprovalPartial) && isOnHold;

/*
Expand Down Expand Up @@ -140,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 @@ -363,7 +364,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 fc6d67e

Please sign in to comment.