diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 81a0125be15a..2db5aacf4d74 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -48,7 +48,7 @@ import type {Status} from '@src/types/onyx/PersonalDetails'; import type {ConnectionName} from '@src/types/onyx/Policy'; import type {NotificationPreference, Participants, PendingChatMember, Participant as ReportParticipant} from '@src/types/onyx/Report'; import type {Message, ReportActions} from '@src/types/onyx/ReportAction'; -import type {Comment, Receipt, TransactionChanges, WaypointCollection} from '@src/types/onyx/Transaction'; +import type {Comment, TransactionChanges, WaypointCollection} from '@src/types/onyx/Transaction'; import {isEmptyObject} from '@src/types/utils/EmptyObject'; import type IconAsset from '@src/types/utils/IconAsset'; import AccountUtils from './AccountUtils'; @@ -4118,7 +4118,6 @@ function buildOptimisticIOUReportAction( iouReportID = '', isSettlingUp = false, isSendMoneyFlow = false, - receipt: Receipt = {}, isOwnPolicyExpenseChat = false, created = DateUtils.getDBTime(), linkedExpenseReportAction?: OnyxEntry, @@ -4132,7 +4131,6 @@ function buildOptimisticIOUReportAction( IOUTransactionID: transactionID, IOUReportID, type, - whisperedTo: [CONST.IOU.RECEIPT_STATE.SCANREADY, CONST.IOU.RECEIPT_STATE.SCANNING].some((value) => value === receipt?.state) ? [currentUserAccountID ?? -1] : [], }; if (type === CONST.IOU.REPORT_ACTION_TYPE.PAY) { @@ -4343,7 +4341,6 @@ function buildOptimisticReportPreview( childReportID?: string, ): ReportAction { const hasReceipt = TransactionUtils.hasReceipt(transaction); - const isReceiptBeingScanned = hasReceipt && TransactionUtils.isReceiptBeingScanned(transaction); const message = getReportPreviewMessage(iouReport); const created = DateUtils.getDBTime(); return { @@ -4353,7 +4350,6 @@ function buildOptimisticReportPreview( pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, originalMessage: { linkedReportID: iouReport?.reportID, - whisperedTo: isReceiptBeingScanned ? [currentUserAccountID ?? -1] : [], }, message: [ { @@ -5203,7 +5199,6 @@ function buildOptimisticMoneyRequestEntities( paymentType?: PaymentMethodType, isSettlingUp = false, isSendMoneyFlow = false, - receipt: Receipt = {}, isOwnPolicyExpenseChat = false, isPersonalTrackingExpense?: boolean, existingTransactionThreadReportID?: string, @@ -5226,7 +5221,6 @@ function buildOptimisticMoneyRequestEntities( isPersonalTrackingExpense ? '0' : iouReport.reportID, isSettlingUp, isSendMoneyFlow, - receipt, isOwnPolicyExpenseChat, iouActionCreationTime, linkedTrackedExpenseReportAction, diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index d1f987b33bdb..4c8b4cd26770 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -1853,7 +1853,6 @@ function getSendInvoiceInformation( undefined, false, false, - receiptObject, false, ); const reportPreviewAction = ReportUtils.buildOptimisticReportPreview(chatReport, optimisticInvoiceReport, trimmedComment, optimisticTransaction); @@ -2033,7 +2032,6 @@ function getMoneyRequestInformation( undefined, false, false, - receiptObject, false, undefined, linkedTrackedExpenseReportAction?.childReportID, @@ -2259,7 +2257,6 @@ function getTrackExpenseInformation( undefined, false, false, - receiptObject, false, !shouldUseMoneyReport, linkedTrackedExpenseReportAction?.childReportID, @@ -3923,7 +3920,6 @@ function createSplitsAndOnyxData( '', false, false, - {}, isOwnPolicyExpenseChat, ); @@ -4504,7 +4500,6 @@ function startSplitBill({ '', false, false, - receiptObject, isOwnPolicyExpenseChat, ); diff --git a/src/pages/home/report/ReportActionsView.tsx b/src/pages/home/report/ReportActionsView.tsx index 6cab01cfc3a3..7af6170da53d 100755 --- a/src/pages/home/report/ReportActionsView.tsx +++ b/src/pages/home/report/ReportActionsView.tsx @@ -199,7 +199,6 @@ function ReportActionsView({ report.reportID, false, false, - {}, false, DateUtils.subtractMillisecondsFromDateTime(actions[actions.length - 1].created, 1), ) as OnyxTypes.ReportAction;