diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index cdfb28ebe1d5..867a0ae6c11a 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -857,7 +857,7 @@ function isTrackExpenseAction(reportAction: OnyxEntry): boolean { +function isPayAction(reportAction: OnyxInputOrEntry): boolean { return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && (reportAction.originalMessage as IOUMessage).type === CONST.IOU.REPORT_ACTION_TYPE.PAY; } diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 48f48bbeef2b..4f9523653ac2 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -2618,7 +2618,7 @@ function getTransactionCommentObject(transaction: OnyxEntry): Comme * This is used in conjunction with canEditRestrictedField to control editing of specific fields like amount, currency, created, receipt, and distance. * On its own, it only controls allowing/disallowing navigating to the editing pages or showing/hiding the 'Edit' icon on report actions */ -function canEditMoneyRequest(reportAction: OnyxEntry): boolean { +function canEditMoneyRequest(reportAction: OnyxInputOrEntry): boolean { const isDeleted = ReportActionsUtils.isDeletedAction(reportAction); if (isDeleted) { @@ -2669,7 +2669,7 @@ function canEditMoneyRequest(reportAction: OnyxEntry): boolean { * Checks if the current user can edit the provided property of an expense * */ -function canEditFieldOfMoneyRequest(reportAction: OnyxEntry, fieldToEdit: ValueOf): boolean { +function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry, fieldToEdit: ValueOf): boolean { // A list of fields that cannot be edited by anyone, once an expense has been settled const restrictedFields: string[] = [ CONST.EDIT_REQUEST_FIELD.AMOUNT,