From 13609c06ffbcc4a8b2bed2a0a698d014d18814cf Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 9 Jan 2024 14:41:59 +0700 Subject: [PATCH] Hide the red dot inn LHN when the request is settled --- src/libs/ReportUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 0d7658adf180..fe961078fb27 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4281,7 +4281,8 @@ function hasSmartscanError(reportActions: ReportAction[]) { if (!ReportActionsUtils.isSplitBillAction(action) && !ReportActionsUtils.isReportPreviewAction(action)) { return false; } - const isReportPreviewError = ReportActionsUtils.isReportPreviewAction(action) && hasMissingSmartscanFields(ReportActionsUtils.getIOUReportIDFromReportActionPreview(action)); + const IOUReportID = ReportActionsUtils.getIOUReportIDFromReportActionPreview(action); + const isReportPreviewError = ReportActionsUtils.isReportPreviewAction(action) && hasMissingSmartscanFields(IOUReportID) && !isSettled(IOUReportID); const transactionID = (action.originalMessage as IOUMessage).IOUTransactionID ?? '0'; const transaction = allTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] ?? {}; const isSplitBillError = ReportActionsUtils.isSplitBillAction(action) && TransactionUtils.hasMissingSmartscanFields(transaction as Transaction);