Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4097,21 +4097,21 @@ function buildOptimisticTaskReport(
* @param reportAction - the parent IOU report action from which to create the thread
* @param moneyRequestReport - the report which the report action belongs to
*/
function buildTransactionThread(reportAction: OnyxEntry<ReportAction | OptimisticIOUReportAction>, moneyRequestReport: Report): OptimisticChatReport {
function buildTransactionThread(reportAction: OnyxEntry<ReportAction | OptimisticIOUReportAction>, moneyRequestReport: OnyxEntry<Report>): OptimisticChatReport {
const participantAccountIDs = [...new Set([currentUserAccountID, Number(reportAction?.actorAccountID)])].filter(Boolean) as number[];
return buildOptimisticChatReport(
participantAccountIDs,
getTransactionReportName(reportAction),
undefined,
moneyRequestReport.policyID,
moneyRequestReport?.policyID,
CONST.POLICY.OWNER_ACCOUNT_ID_FAKE,
false,
'',
undefined,
undefined,
CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
reportAction?.reportActionID,
moneyRequestReport.reportID,
moneyRequestReport?.reportID,
);
}

Expand Down
5 changes: 3 additions & 2 deletions src/libs/actions/ReportActions.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import Onyx from 'react-native-onyx';
import type {OnyxEntry} from 'react-native-onyx';
import * as ReportActionUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import type ReportAction from '@src/types/onyx/ReportAction';
import * as Report from './Report';

function clearReportActionErrors(reportID: string, reportAction: ReportAction) {
function clearReportActionErrors(reportID: string, reportAction: OnyxEntry<ReportAction>) {
const originalReportID = ReportUtils.getOriginalReportID(reportID, reportAction);

if (!reportAction.reportActionID) {
if (!reportAction?.reportActionID) {
return;
}

Expand Down
Loading