Skip to content

Commit

Permalink
Merge pull request #42420 from software-mansion-labs/smelaa/pending-a…
Browse files Browse the repository at this point in the history
…nd-scanning/bug

[FIX][Violations - Pending Receipts] Bug in `Display the rter Violation with the Pending Pattern`
  • Loading branch information
yuwenmemon authored May 22, 2024
2 parents a982852 + 30355ef commit f545b07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ function ReportPreview({
const lastThreeTransactionsWithReceipts = transactionsWithReceipts.slice(-3);
const lastThreeReceipts = lastThreeTransactionsWithReceipts.map((transaction) => ReceiptUtils.getThumbnailAndImageURIs(transaction));
const showRTERViolationMessage =
numberOfRequests === 1 && TransactionUtils.hasPendingUI(allTransactions[0], TransactionUtils.getTransactionViolations(allTransactions[0].transactionID, transactionViolations));
numberOfRequests === 1 &&
TransactionUtils.hasPendingUI(allTransactions[0], TransactionUtils.getTransactionViolations(allTransactions[0]?.transactionID ?? '', transactionViolations));

let formattedMerchant = numberOfRequests === 1 ? TransactionUtils.getMerchant(allTransactions[0]) : null;
const formattedDescription = numberOfRequests === 1 ? TransactionUtils.getDescription(allTransactions[0]) : null;
Expand Down

0 comments on commit f545b07

Please sign in to comment.