From 0537b119b6afadaf30990582228db66cbe36688f Mon Sep 17 00:00:00 2001 From: daledah Date: Wed, 4 Dec 2024 16:27:02 +0700 Subject: [PATCH] fix: remove duplicate code --- src/libs/actions/IOU.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 97bd96c61212..a627f0f53d32 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -7190,7 +7190,7 @@ function submitReport(expenseReport: OnyxTypes.Report) { const adminAccountID = policy?.role === CONST.POLICY.ROLE.ADMIN ? currentUserPersonalDetails?.accountID : undefined; const optimisticSubmittedReportAction = ReportUtils.buildOptimisticSubmittedReportAction(expenseReport?.total ?? 0, expenseReport.currency ?? '', expenseReport.reportID, adminAccountID); const optimisticNextStep = NextStepUtils.buildNextStep(expenseReport, isSubmitAndClosePolicy ? CONST.REPORT.STATUS_NUM.CLOSED : CONST.REPORT.STATUS_NUM.SUBMITTED); - const approvalChain = ReportUtils.getApprovalChain(PolicyUtils.getPolicy(expenseReport?.policyID), expenseReport); + const approvalChain = ReportUtils.getApprovalChain(policy, expenseReport); const managerID = PersonalDetailsUtils.getAccountIDsByLogins(approvalChain).at(0); const optimisticData: OnyxUpdate[] = !isSubmitAndClosePolicy