Skip to content
2 changes: 1 addition & 1 deletion src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ function MoneyReportHeader({
Navigation.goBack(route.params?.backTo);
// eslint-disable-next-line @typescript-eslint/no-deprecated
InteractionManager.runAfterInteractions(() => {
deleteAppReport(moneyRequestReport?.reportID);
deleteAppReport(moneyRequestReport?.reportID, email ?? '');
});
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ReportActionItemImages from '@components/ReportActionItem/ReportActionIte
import UserInfoCellsWithArrow from '@components/SelectionListWithSections/Search/UserInfoCellsWithArrow';
import Text from '@components/Text';
import TransactionPreviewSkeletonView from '@components/TransactionPreviewSkeletonView';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useEnvironment from '@hooks/useEnvironment';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -82,7 +83,7 @@ function TransactionPreviewContent({
const isReportAPolicyExpenseChat = isPolicyExpenseChat(chatReport);
const [reportActions] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${getNonEmptyStringOnyxID(report?.reportID)}`, {canBeMissing: true});
const isChatReportArchived = useReportIsArchived(chatReport?.reportID);

const currentUserDetails = useCurrentUserPersonalDetails();
const transactionPreviewCommonArguments = useMemo(
() => ({
iouReport: report,
Expand All @@ -101,8 +102,9 @@ function TransactionPreviewContent({
...transactionPreviewCommonArguments,
areThereDuplicates,
isReportAPolicyExpenseChat,
currentUserEmail: currentUserDetails.email ?? '',
}),
[areThereDuplicates, transactionPreviewCommonArguments, isReportAPolicyExpenseChat],
[areThereDuplicates, transactionPreviewCommonArguments, isReportAPolicyExpenseChat, currentUserDetails.email],
);

const {shouldShowRBR, shouldShowMerchant, shouldShowSplitShare, shouldShowTag, shouldShowCategory, shouldShowSkeleton, shouldShowDescription} = conditionals;
Expand All @@ -120,9 +122,10 @@ function TransactionPreviewContent({
shouldShowRBR,
violationMessage,
reportActions,
currentUserEmail: currentUserDetails.email ?? '',
originalTransaction,
}),
[transactionPreviewCommonArguments, shouldShowRBR, violationMessage, reportActions, originalTransaction],
[transactionPreviewCommonArguments, shouldShowRBR, violationMessage, reportActions, currentUserDetails.email, originalTransaction],
);
const getTranslatedText = (item: TranslationPathOrText) => (item.translationPath ? translate(item.translationPath) : (item.text ?? ''));

Expand Down
2 changes: 1 addition & 1 deletion src/libs/PersonalDetailsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
let personalDetails: Array<PersonalDetails | null> = [];
let allPersonalDetails: OnyxEntry<PersonalDetailsList> = {};
let emailToPersonalDetailsCache: Record<string, PersonalDetails> = {};
Onyx.connect({

Check warning on line 25 in src/libs/PersonalDetailsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (val) => {
personalDetails = Object.values(val ?? {});
Expand All @@ -39,7 +39,7 @@
let hiddenTranslation = '';
let youTranslation = '';

Onyx.connect({

Check warning on line 42 in src/libs/PersonalDetailsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.ARE_TRANSLATIONS_LOADING,
initWithStoredValues: false,
callback: (value) => {
Expand Down Expand Up @@ -117,7 +117,7 @@
personalDetailsParam = allPersonalDetails,
}: {
accountIDs: number[];
currentUserAccountID: number;
currentUserAccountID?: number;
shouldChangeUserDisplayName?: boolean;
personalDetailsParam?: Partial<PersonalDetailsList>;
}): PersonalDetails[] {
Expand Down
6 changes: 4 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@
const parsedReportActionMessageCache: Record<string, string> = {};

let conciergeReportID: OnyxEntry<string>;
Onyx.connect({

Check warning on line 963 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.CONCIERGE_REPORT_ID,
callback: (value) => {
conciergeReportID = value;
Expand All @@ -968,7 +968,7 @@
});

const defaultAvatarBuildingIconTestID = 'SvgDefaultAvatarBuilding Icon';
Onyx.connect({

Check warning on line 971 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, val is undefined
Expand All @@ -986,7 +986,7 @@
let allPersonalDetails: OnyxEntry<PersonalDetailsList>;
let allPersonalDetailLogins: string[];
let currentUserPersonalDetails: OnyxEntry<PersonalDetails>;
Onyx.connect({

Check warning on line 989 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
if (currentUserAccountID) {
Expand All @@ -998,14 +998,14 @@
});

let allReportsDraft: OnyxCollection<Report>;
Onyx.connect({

Check warning on line 1001 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_DRAFT,
waitForCollectionCallback: true,
callback: (value) => (allReportsDraft = value),
});

let allPolicies: OnyxCollection<Policy>;
Onyx.connect({

Check warning on line 1008 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.POLICY,
waitForCollectionCallback: true,
callback: (value) => (allPolicies = value),
Expand All @@ -1020,7 +1020,7 @@

let allReports: OnyxCollection<Report>;
let reportsByPolicyID: ReportByPolicyMap;
Onyx.connect({

Check warning on line 1023 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
callback: (value) => {
Expand Down Expand Up @@ -1058,14 +1058,14 @@
});

let allBetas: OnyxEntry<Beta[]>;
Onyx.connect({

Check warning on line 1061 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.BETAS,
callback: (value) => (allBetas = value),
});

let allTransactions: OnyxCollection<Transaction> = {};
let reportsTransactions: Record<string, Transaction[]> = {};
Onyx.connect({

Check warning on line 1068 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.TRANSACTION,
waitForCollectionCallback: true,
callback: (value) => {
Expand Down Expand Up @@ -2762,7 +2762,7 @@
return isManager && isExpenseReport(report) && isProcessingReport(report);
}

function hasOutstandingChildRequest(chatReport: Report, iouReportOrID: OnyxEntry<Report> | string) {
function hasOutstandingChildRequest(chatReport: Report, iouReportOrID: OnyxEntry<Report> | string, currentUserEmailParam: string) {
const reportActions = getAllReportActions(chatReport.reportID);
// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line @typescript-eslint/no-deprecated
Expand All @@ -2781,7 +2781,9 @@
const iouReport = typeof iouReportOrID !== 'string' && iouReportOrID?.reportID === iouReportID ? iouReportOrID : getReportOrDraftReport(iouReportID);
const transactions = getReportTransactions(iouReportID);
return (
canIOUBePaid(iouReport, chatReport, policy, transactions) || canApproveIOU(iouReport, policy, transactions) || canSubmitReport(iouReport, policy, transactions, undefined, false)
canIOUBePaid(iouReport, chatReport, policy, transactions) ||
canApproveIOU(iouReport, policy, transactions) ||
canSubmitReport(iouReport, policy, transactions, undefined, false, currentUserEmailParam)
);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/libs/SearchUIUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ function getActions(
}

// We check for isAllowedToApproveExpenseReport because if the policy has preventSelfApprovals enabled, we disable the Submit action and in that case we want to show the View action instead
if (canSubmitReport(report, policy, allReportTransactions, allViolations, isIOUReportArchived || isChatReportArchived) && isAllowedToApproveExpenseReport) {
if (canSubmitReport(report, policy, allReportTransactions, allViolations, isIOUReportArchived || isChatReportArchived, currentUserEmail) && isAllowedToApproveExpenseReport) {
allActions.push(CONST.SEARCH.ACTION_TYPES.SUBMIT);
}

Expand Down
8 changes: 4 additions & 4 deletions src/libs/TransactionPreviewUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {abandonReviewDuplicateTransactions, setReviewDuplicatesKey} from './acti
import {isCategoryMissing} from './CategoryUtils';
import {convertToDisplayString} from './CurrencyUtils';
import DateUtils from './DateUtils';
import {getCurrentUserEmail} from './Network/NetworkStore';
import {getPolicy} from './PolicyUtils';
import {getOriginalMessage, isMessageDeleted, isMoneyRequestAction} from './ReportActionsUtils';
import {
Expand Down Expand Up @@ -188,6 +187,7 @@ function getTransactionPreviewTextAndTranslationPaths({
shouldShowRBR,
violationMessage,
reportActions,
currentUserEmail,
originalTransaction,
}: {
iouReport: OnyxEntry<OnyxTypes.Report>;
Expand All @@ -199,6 +199,7 @@ function getTransactionPreviewTextAndTranslationPaths({
shouldShowRBR: boolean;
violationMessage?: string;
reportActions?: OnyxTypes.ReportActions;
currentUserEmail: string;
originalTransaction?: OnyxEntry<OnyxTypes.Transaction>;
}) {
const isFetchingWaypoints = isFetchingWaypointsFromServer(transaction);
Expand All @@ -214,7 +215,6 @@ function getTransactionPreviewTextAndTranslationPaths({
const isTransactionScanning = isScanning(transaction);
const hasFieldErrors = hasMissingSmartscanFields(transaction);
const isPaidGroupPolicy = isPaidGroupPolicyUtil(iouReport);
const currentUserEmail = getCurrentUserEmail();

// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line @typescript-eslint/no-deprecated
Expand Down Expand Up @@ -347,6 +347,7 @@ function createTransactionPreviewConditionals({
isBillSplit,
isReportAPolicyExpenseChat,
areThereDuplicates,
currentUserEmail,
}: {
iouReport: OnyxInputValue<OnyxTypes.Report> | undefined;
transaction: OnyxEntry<OnyxTypes.Transaction> | undefined;
Expand All @@ -356,6 +357,7 @@ function createTransactionPreviewConditionals({
isBillSplit: boolean;
isReportAPolicyExpenseChat: boolean;
areThereDuplicates: boolean;
currentUserEmail: string;
}) {
const {amount: requestAmount, comment: requestComment, merchant, tag, category} = transactionDetails;

Expand All @@ -366,8 +368,6 @@ function createTransactionPreviewConditionals({
const isApproved = isReportApproved({report: iouReport});
const isSettlementOrApprovalPartial = !!iouReport?.pendingFields?.partial;

const currentUserEmail = getCurrentUserEmail();

// This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850
// eslint-disable-next-line @typescript-eslint/no-deprecated
const policy = getPolicy(iouReport?.policyID);
Expand Down
11 changes: 2 additions & 9 deletions src/libs/TransactionUtils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,10 @@ Onyx.connect({
callback: (value) => (allTransactionViolations = value),
});

let deprecatedCurrentUserEmail = '';
let deprecatedCurrentUserAccountID = -1;
Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (val) => {
deprecatedCurrentUserEmail = val?.email ?? '';
deprecatedCurrentUserAccountID = val?.accountID ?? CONST.DEFAULT_NUMBER_ID;
},
});
Expand Down Expand Up @@ -895,7 +893,7 @@ function getAttendees(transaction: OnyxInputOrEntry<Transaction>): Attendee[] {
const creatorAccountID = report?.ownerAccountID;

if (creatorAccountID) {
const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID], currentUserAccountID: deprecatedCurrentUserAccountID});
const [creatorDetails] = getPersonalDetailsByIDs({accountIDs: [creatorAccountID]});
const creatorEmail = creatorDetails?.login ?? '';
const creatorDisplayName = creatorDetails?.displayName ?? creatorEmail;

Expand Down Expand Up @@ -1452,7 +1450,7 @@ function isViolationDismissed(
const dismissedByEmails = Object.keys(violationDismissals);

// Current user dismissed it themselves
if (dismissedByEmails.includes(currentUserEmail || deprecatedCurrentUserEmail)) {
if (dismissedByEmails.includes(currentUserEmail)) {
return true;
}

Expand Down Expand Up @@ -2104,10 +2102,6 @@ function getAllSortedTransactions(iouReportID?: string): Array<OnyxEntry<Transac
});
}

function shouldShowRTERViolationMessage(transactions: Transaction[] | undefined, currentUserEmail: string, report: OnyxEntry<Report>, policy: OnyxEntry<Policy>) {
return transactions?.length === 1 && hasPendingUI(transactions?.at(0), getTransactionViolations(transactions?.at(0), allTransactionViolations, currentUserEmail, report, policy));
}

function isExpenseSplit(transaction: OnyxEntry<Transaction>, originalTransaction: OnyxEntry<Transaction>): boolean {
const {originalTransactionID, source, splits} = transaction?.comment ?? {};

Expand Down Expand Up @@ -2286,7 +2280,6 @@ export {
isPerDiemRequest,
isViolationDismissed,
isBrokenConnectionViolation,
shouldShowRTERViolationMessage,
isPartialTransaction,
isPendingCardOrScanningTransaction,
isScanning,
Expand Down
16 changes: 8 additions & 8 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ import {buildAddMembersToWorkspaceOnyxData, buildUpdateWorkspaceMembersRoleOnyxD
import {buildOptimisticRecentlyUsedCurrencies, buildPolicyData, generatePolicyID} from './Policy/Policy';
import {buildOptimisticPolicyRecentlyUsedTags, getPolicyTagsData} from './Policy/Tag';
import type {GuidedSetupData} from './Report';
import {buildInviteToRoomOnyxData, completeOnboarding, getCurrentUserAccountID, getCurrentUserEmail, notifyNewAction, optimisticReportLastData} from './Report';
import {buildInviteToRoomOnyxData, completeOnboarding, getCurrentUserAccountID, notifyNewAction, optimisticReportLastData} from './Report';
import {clearAllRelatedReportActionErrors} from './ReportActions';
import {sanitizeRecentWaypoints} from './Transaction';
import {removeDraftSplitTransaction, removeDraftTransaction, removeDraftTransactions} from './TransactionEdit';
Expand Down Expand Up @@ -8810,7 +8810,7 @@ function deleteMoneyRequest(
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport?.reportID}`,
value: {
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, updatedIOUReport),
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, updatedIOUReport, currentUserEmail),
},
});
}
Expand All @@ -8829,7 +8829,7 @@ function deleteMoneyRequest(
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport?.reportID}`,
value: {
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID),
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID, currentUserEmail),
iouReportID: null,
...optimisticLastReportData,
},
Expand Down Expand Up @@ -9806,7 +9806,7 @@ function getPayMoneyRequestParams({
const optimisticChatReport = {
...chatReport,
lastReadTime: DateUtils.getDBTime(),
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID),
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, iouReport?.reportID, currentUserEmail),
iouReportID: null,
lastMessageText: getReportActionText(optimisticIOUReportAction),
lastMessageHtml: getReportActionHtml(optimisticIOUReportAction),
Expand Down Expand Up @@ -10223,13 +10223,13 @@ function canSubmitReport(
transactions: OnyxTypes.Transaction[] | SearchTransaction[],
allViolations: OnyxCollection<OnyxTypes.TransactionViolations> | undefined,
isReportArchived: boolean,
currentUserEmailParam: string,
) {
const currentUserAccountID = getCurrentUserAccountID();
const currentUserEmailValue = getCurrentUserEmail() ?? '';
const isOpenExpenseReport = isOpenExpenseReportReportUtils(report);
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const hasAllPendingRTERViolations = allHavePendingRTERViolation(transactions, allViolations, currentUserEmail, report, policy);
const hasTransactionWithoutRTERViolation = hasAnyTransactionWithoutRTERViolation(transactions, allViolations, currentUserEmailValue, report, policy);
const hasAllPendingRTERViolations = allHavePendingRTERViolation(transactions, allViolations, currentUserEmailParam, report, policy);
const hasTransactionWithoutRTERViolation = hasAnyTransactionWithoutRTERViolation(transactions, allViolations, currentUserEmailParam, report, policy);
const hasOnlyPendingCardOrScanFailTransactions = transactions.length > 0 && transactions.every((t) => isPendingCardOrScanningTransaction(t));

return (
Expand Down Expand Up @@ -10348,7 +10348,7 @@ function approveMoneyRequest(
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${expenseReport.chatReportID}`,
value: {
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, updatedExpenseReport),
hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, updatedExpenseReport, currentUserEmail),
},
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4822,7 +4822,7 @@ function clearDeleteTransactionNavigateBackUrl() {
}

/** Deletes a report and un-reports all transactions on the report along with its reportActions, any linked reports and any linked IOU report actions. */
function deleteAppReport(reportID: string | undefined) {
function deleteAppReport(reportID: string | undefined, currentUserEmailParam: string) {
if (!reportID) {
Log.warn('[Report] deleteReport called with no reportID');
return;
Expand All @@ -4842,7 +4842,7 @@ function deleteAppReport(reportID: string | undefined) {
const currentTime = DateUtils.getDBTime();
selfDMReport = buildOptimisticSelfDMReport(currentTime);
selfDMReportID = selfDMReport.reportID;
createdAction = buildOptimisticCreatedReportAction(currentUserEmail ?? '', currentTime);
createdAction = buildOptimisticCreatedReportAction(currentUserEmailParam ?? '', currentTime);
selfDMParameters = {reportID: selfDMReport.reportID, createdReportActionID: createdAction.reportActionID};
optimisticData.push(
{
Expand Down Expand Up @@ -5151,7 +5151,7 @@ function deleteAppReport(reportID: string | undefined) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`,
value: {hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, report?.reportID)},
value: {hasOutstandingChildRequest: hasOutstandingChildRequest(chatReport, report?.reportID, currentUserEmailParam)},
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ConfirmModal from '@components/ConfirmModal';
import PopoverWithMeasuredContent from '@components/PopoverWithMeasuredContent';
import {useSearchContext} from '@components/Search/SearchContext';
import useAncestors from '@hooks/useAncestors';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useDeleteTransactions from '@hooks/useDeleteTransactions';
import useDuplicateTransactionsAndViolations from '@hooks/useDuplicateTransactionsAndViolations';
import useGetIOUReportFromReportAction from '@hooks/useGetIOUReportFromReportAction';
Expand Down Expand Up @@ -71,6 +72,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro
});
const actionSheetAwareScrollViewContext = useContext(ActionSheetAwareScrollViewContext);
const instanceIDRef = useRef('');
const {email} = useCurrentUserPersonalDetails();

const [isPopoverVisible, setIsPopoverVisible] = useState(false);
const [isDeleteCommentConfirmModalVisible, setIsDeleteCommentConfirmModalVisible] = useState(false);
Expand Down Expand Up @@ -363,7 +365,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro
deleteTransactions([originalMessage.IOUTransactionID], duplicateTransactions, duplicateTransactionViolations, currentSearchHash);
}
} else if (isReportPreviewAction(reportAction)) {
deleteAppReport(reportAction.childReportID);
deleteAppReport(reportAction.childReportID, email ?? '');
} else if (reportAction) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
InteractionManager.runAfterInteractions(() => {
Expand All @@ -384,6 +386,7 @@ function PopoverReportActionContextMenu({ref}: PopoverReportActionContextMenuPro
deleteTransactions,
currentSearchHash,
isOriginalReportArchived,
email,
]);

const hideDeleteModal = () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/actions/ReportTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ describe('actions/Report', () => {
});

// When deleting the expense report
Report.deleteAppReport(reportID);
Report.deleteAppReport(reportID, '');
await waitForBatchedUpdates();

// Then only the IOU action with type of CREATE and TRACK is moved to the self DM
Expand Down Expand Up @@ -2139,7 +2139,7 @@ describe('actions/Report', () => {
await Onyx.merge(`${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`, transaction);

// When deleting the first expense report
Report.deleteAppReport(expenseReport1.reportID);
Report.deleteAppReport(expenseReport1.reportID, '');
await waitForBatchedUpdates();

const report = await new Promise<OnyxEntry<OnyxTypes.Report>>((resolve) => {
Expand Down
Loading
Loading