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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"test:debug": "TZ=utc NODE_OPTIONS='--inspect-brk --experimental-vm-modules' jest --runInBand",
"perf-test": "NODE_OPTIONS=--experimental-vm-modules npx reassure",
"typecheck": "NODE_OPTIONS=--max_old_space_size=8192 tsc",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=669 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto",
"lint": "NODE_OPTIONS=--max_old_space_size=8192 eslint . --max-warnings=668 --cache --cache-location=node_modules/.cache/eslint --cache-strategy content --concurrency=auto",
"lint-changed": "NODE_OPTIONS=--max_old_space_size=8192 ./scripts/lintChanged.sh",
"check-lazy-loading": "ts-node scripts/checkLazyLoading.ts",
"lint-watch": "npx eslint-watch --watch --changed",
Expand Down
6 changes: 4 additions & 2 deletions src/components/MoneyRequestConfirmationListFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import React, {memo, useMemo} from 'react';
import {View} from 'react-native';
import type {OnyxEntry} from 'react-native-onyx';
import type {ValueOf} from 'type-fest';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
Expand Down Expand Up @@ -282,6 +283,7 @@ function MoneyRequestConfirmationListFooter({
const {policyForMovingExpensesID, shouldSelectPolicy} = usePolicyForMovingExpenses();

const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {selector: emailSelector, canBeMissing: true});
const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails();
const isUnreported = transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID;
const isCreatingTrackExpense = action === CONST.IOU.ACTION.CREATE && iouType === CONST.IOU.TYPE.TRACK;

Expand Down Expand Up @@ -350,12 +352,12 @@ function MoneyRequestConfirmationListFooter({
}, [allReports, shouldUseTransactionReport, transaction?.reportID, outstandingReportID]);

const reportName = useMemo(() => {
const name = computeReportName(selectedReport, allReports, allPolicies);
const name = computeReportName(selectedReport, allReports, allPolicies, undefined, undefined, undefined, undefined, currentUserAccountID);
if (!name) {
return isUnreported ? translate('common.none') : translate('iou.newReport');
}
return name;
}, [isUnreported, selectedReport, allReports, allPolicies, translate]);
}, [isUnreported, selectedReport, allReports, allPolicies, translate, currentUserAccountID]);

const shouldReportBeEditableFromFAB = isUnreported ? allOutstandingReports.length >= 1 : allOutstandingReports.length > 1;

Expand Down
9 changes: 8 additions & 1 deletion src/components/TransactionItemRow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import AmountCell from '@components/SelectionListWithSections/Search/TotalCell';
import UserInfoCell from '@components/SelectionListWithSections/Search/UserInfoCell';
import WorkspaceCell from '@components/SelectionListWithSections/Search/WorkspaceCell';
import Text from '@components/Text';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import {useMemoizedLazyExpensifyIcons} from '@hooks/useLazyAsset';
import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
Expand Down Expand Up @@ -187,6 +188,7 @@ function TransactionItemRow({
const StyleUtils = useStyleUtils();
const theme = useTheme();
const {isLargeScreenWidth} = useResponsiveLayout();
const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails();
const hasCategoryOrTag = !isCategoryMissing(transactionItem?.category) || !!transactionItem.tag;
const createdAt = getTransactionCreated(transactionItem);
const expensicons = useMemoizedLazyExpensifyIcons(['ArrowRight']);
Expand Down Expand Up @@ -551,7 +553,11 @@ function TransactionItemRow({
[CONST.SEARCH.TABLE_COLUMNS.TITLE]: (
<View style={[StyleUtils.getReportTableColumnStyles(CONST.SEARCH.TABLE_COLUMNS.TITLE)]}>
<TextCell
text={computeReportName(transactionItem.report) ?? transactionItem.report?.reportName ?? ''}
text={
computeReportName(transactionItem.report, undefined, undefined, undefined, undefined, undefined, undefined, currentUserAccountID) ??
transactionItem.report?.reportName ??
''
}
isLargeScreenWidth={isLargeScreenWidth}
/>
</View>
Expand Down Expand Up @@ -598,6 +604,7 @@ function TransactionItemRow({
isAmountColumnWide,
isTaxAmountColumnWide,
isLargeScreenWidth,
currentUserAccountID,
reportActions,
],
);
Expand Down
7 changes: 5 additions & 2 deletions src/libs/ModifiedExpenseMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {getEnvironmentURL} from './Environment/Environment';
import {translateLocal} from './Localize';
import Log from './Log';
import Parser from './Parser';
import {getPersonalDetailByEmail} from './PersonalDetailsUtils';
import {getCleanedTagName, getPolicy, getSortedTagKeys, isPolicyAdmin} from './PolicyUtils';
import {getOriginalMessage, isModifiedExpenseAction} from './ReportActionsUtils';
// This cycle import is safe because ReportNameUtils was extracted from ReportUtils to separate report name computation logic.
Expand Down Expand Up @@ -163,8 +164,10 @@ function getForExpenseMovedFromSelfDM(translate: LocalizedTranslate, destination
// In NewDot, the "Move report" flow only supports moving expenses from self-DM to:
// - A policy expense chat
// - A 1:1 DM
// eslint-disable-next-line @typescript-eslint/no-deprecated
const reportName = isPolicyExpenseChat(rootParentReport) ? getPolicyExpenseChatName({report: rootParentReport}) : buildReportNameFromParticipantNames({report: rootParentReport});
const currentUserAccountID = getPersonalDetailByEmail(currentUserLogin)?.accountID;

@linhvovan29546 linhvovan29546 Feb 5, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShridharGoel AFAIK, our target is to remove the usage of Onyx.connect, However, this change goes against the target because it uses a other Onyx.connect

cc @tgolen @shubham1206agra

Never mind, I’ll remove them here

const reportName = isPolicyExpenseChat(rootParentReport)
? getPolicyExpenseChatName({report: rootParentReport})
: buildReportNameFromParticipantNames({report: rootParentReport, currentUserAccountID});
const policyName = getPolicyName({report: rootParentReport, returnEmptyIfNotFound: true});
// If we can't determine either the report name or policy name, return the default message
if (isEmpty(policyName) && !reportName) {
Expand Down
8 changes: 4 additions & 4 deletions src/libs/OptionsListUtils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
*/
let currentUserLogin: string | undefined;
let currentUserAccountID: number | undefined;
Onyx.connect({

Check warning on line 196 in src/libs/OptionsListUtils/index.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) => {
currentUserLogin = value?.email;
Expand All @@ -202,13 +202,13 @@
});

let allPersonalDetails: OnyxEntry<PersonalDetailsList>;
Onyx.connect({

Check warning on line 205 in src/libs/OptionsListUtils/index.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) => (allPersonalDetails = isEmptyObject(value) ? {} : value),
});

const policies: OnyxCollection<Policy> = {};
Onyx.connect({

Check warning on line 211 in src/libs/OptionsListUtils/index.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,
callback: (policy, key) => {
if (!policy || !key || !policy.name) {
Expand All @@ -220,14 +220,14 @@
});

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

Check warning on line 223 in src/libs/OptionsListUtils/index.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: (val) => (allPolicies = val),
});

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

Check warning on line 230 in src/libs/OptionsListUtils/index.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 All @@ -236,7 +236,7 @@
});

let allReportNameValuePairs: OnyxCollection<ReportNameValuePairs>;
Onyx.connect({

Check warning on line 239 in src/libs/OptionsListUtils/index.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_NAME_VALUE_PAIRS,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -248,7 +248,7 @@
const allSortedReportActions: Record<string, ReportAction[]> = {};
let allReportActions: OnyxCollection<ReportActions>;
const lastVisibleReportActions: ReportActions = {};
Onyx.connect({

Check warning on line 251 in src/libs/OptionsListUtils/index.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_ACTIONS,
waitForCollectionCallback: true,
callback: (actions) => {
Expand Down Expand Up @@ -311,7 +311,7 @@

let activePolicyID: OnyxEntry<string>;
Onyx.connect({
key: ONYXKEYS.NVP_ACTIVE_POLICY_ID,

Check warning on line 314 in src/libs/OptionsListUtils/index.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
callback: (value) => (activePolicyID = value),
});

Expand Down Expand Up @@ -659,7 +659,7 @@
: undefined;
// For workspace chats, use the report title
if (reportUtilsIsPolicyExpenseChat(report) && !isEmptyObject(iouReport)) {
const reportName = computeReportName(iouReport);
const reportName = computeReportName(iouReport, undefined, undefined, undefined, undefined, undefined, undefined, currentUserAccountID);
lastMessageTextFromReport = formatReportLastMessageText(reportName);
} else {
const reportPreviewMessage = getReportPreviewMessage(
Expand Down Expand Up @@ -953,7 +953,7 @@
: getAlternateText(result, {showChatPreviewLine, forcePolicyNamePreview}, !!result.private_isArchived, lastActorDetails);

const personalDetailsForCompute: PersonalDetailsList | undefined = personalDetails ?? undefined;
const computedReportName = computeReportName(report, allReports, allPolicies, undefined, allReportNameValuePairs, personalDetailsForCompute, allReportActions);
const computedReportName = computeReportName(report, allReports, allPolicies, undefined, allReportNameValuePairs, personalDetailsForCompute, allReportActions, currentUserAccountID);
reportName = showPersonalDetails
? getDisplayNameForParticipant({accountID: accountIDs.at(0), formatPhoneNumber: formatPhoneNumberPhoneUtils}) || formatPhoneNumberPhoneUtils(personalDetail?.login ?? '')
: computedReportName;
Expand Down Expand Up @@ -1020,7 +1020,7 @@
// eslint-disable-next-line @typescript-eslint/no-deprecated
option.alternateText = translateLocal('reportActionsView.yourSpace');
} else if (option.isInvoiceRoom) {
option.text = computeReportName(report, undefined, undefined, undefined, allReportNameValuePairs, allPersonalDetails, undefined);
option.text = computeReportName(report, undefined, undefined, undefined, allReportNameValuePairs, allPersonalDetails, undefined, currentUserAccountID);
// eslint-disable-next-line @typescript-eslint/no-deprecated
option.alternateText = translateLocal('workspace.common.invoices');
} else {
Expand Down Expand Up @@ -1068,7 +1068,7 @@
// eslint-disable-next-line @typescript-eslint/no-deprecated
option.alternateText = translateLocal('reportActionsView.yourSpace');
} else if (option.isInvoiceRoom) {
option.text = computeReportName(report, undefined, undefined, undefined, allReportNameValuePairs, allPersonalDetails, undefined);
option.text = computeReportName(report, undefined, undefined, undefined, allReportNameValuePairs, allPersonalDetails, undefined, currentUserAccountID);
// eslint-disable-next-line @typescript-eslint/no-deprecated
option.alternateText = translateLocal('workspace.common.invoices');
} else if (unknownUserDetails) {
Expand Down
25 changes: 14 additions & 11 deletions src/libs/ReportNameUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,9 @@
isUserCreatedPolicyRoom,
} from './ReportUtils';

let currentUserAccountID: number | undefined;
let allPersonalDetails: OnyxEntry<PersonalDetailsList>;

Onyx.connect({
key: ONYXKEYS.SESSION,
callback: (value) => {
currentUserAccountID = value?.accountID;
},
});

Onyx.connect({

Check warning on line 124 in src/libs/ReportNameUtils.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) => {
allPersonalDetails = value;
Expand All @@ -146,7 +138,15 @@
* This function is useful in contexts such as 1:1 direct messages (DMs) or other group chats.
* It limits to a maximum of 5 participants for the title and uses short names unless there is only one participant.
*/
const buildReportNameFromParticipantNames = ({report, personalDetailsList: personalDetailsData}: {report: OnyxEntry<Report>; personalDetailsList?: Partial<PersonalDetailsList>}) =>
const buildReportNameFromParticipantNames = ({
report,
personalDetailsList: personalDetailsData,
currentUserAccountID,
}: {
report: OnyxEntry<Report>;
personalDetailsList?: Partial<PersonalDetailsList>;
currentUserAccountID?: number;
}) =>
Object.keys(report?.participants ?? {})
.map(Number)
.filter((id) => id !== currentUserAccountID)
Expand Down Expand Up @@ -255,11 +255,13 @@
receiverPolicy,
personalDetails,
policies,
currentUserAccountID,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShridharGoel Why currentUserAccountID is optional here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to a required param

}: {
report: OnyxEntry<Report>;
receiverPolicy: OnyxEntry<Policy>;
personalDetails?: Partial<PersonalDetailsList>;
policies?: Policy[];
currentUserAccountID?: number;
}): string {
const invoiceReceiver = report?.invoiceReceiver;
const isIndividual = invoiceReceiver?.type === CONST.REPORT.INVOICE_RECEIVER_TYPE.INDIVIDUAL;
Expand Down Expand Up @@ -669,6 +671,7 @@
allReportNameValuePairs?: OnyxCollection<ReportNameValuePairs>,
personalDetailsList?: PersonalDetailsList,
reportActions?: OnyxCollection<ReportActions>,
currentUserAccountID?: number,
): string {
if (!report || !report.reportID) {
return '';
Expand Down Expand Up @@ -740,7 +743,7 @@
receiverPolicyID = (receiver as {policyID: string}).policyID;
}
const invoiceReceiverPolicy = receiverPolicyID ? policies?.[`${ONYXKEYS.COLLECTION.POLICY}${receiverPolicyID}`] : undefined;
formattedName = getInvoicesChatName({report, receiverPolicy: invoiceReceiverPolicy, personalDetails: personalDetailsList});
formattedName = getInvoicesChatName({report, receiverPolicy: invoiceReceiverPolicy, personalDetails: personalDetailsList, currentUserAccountID});
}

if (isSelfDM(report)) {
Expand All @@ -761,7 +764,7 @@
}

// Not a room or PolicyExpenseChat, generate title from first 5 other participants
formattedName = buildReportNameFromParticipantNames({report, personalDetailsList});
formattedName = buildReportNameFromParticipantNames({report, personalDetailsList, currentUserAccountID});

const finalName = formattedName ?? report?.reportName ?? '';

Expand Down
10 changes: 8 additions & 2 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5993,7 +5993,13 @@ function getReportName(
}

if (isInvoiceRoom(report)) {
formattedName = getInvoicesChatName({report, receiverPolicy: invoiceReceiverPolicy, personalDetails, policies});
formattedName = getInvoicesChatName({
report,
receiverPolicy: invoiceReceiverPolicy,
personalDetails,
policies,
currentUserAccountID,
});
}

if (isSelfDM(report)) {
Expand All @@ -6014,7 +6020,7 @@ function getReportName(
}

// Not a room or PolicyExpenseChat, generate title from first 5 other participants
formattedName = buildReportNameFromParticipantNames({report, personalDetailsList: personalDetails});
formattedName = buildReportNameFromParticipantNames({report, personalDetailsList: personalDetails, currentUserAccountID});

const finalName = formattedName || (report?.reportName ?? '');

Expand Down
7 changes: 5 additions & 2 deletions src/libs/actions/OnyxDerived/configs/reportAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ export default createOnyxDerivedValueConfig({
ONYXKEYS.COLLECTION.REPORT_NAME_VALUE_PAIRS,
ONYXKEYS.COLLECTION.TRANSACTION,
ONYXKEYS.PERSONAL_DETAILS_LIST,
ONYXKEYS.SESSION,
ONYXKEYS.COLLECTION.POLICY,
ONYXKEYS.COLLECTION.REPORT_METADATA,
],
compute: (
[reports, preferredLocale, transactionViolations, reportActions, reportNameValuePairs, transactions, personalDetails, policies],
[reports, preferredLocale, transactionViolations, reportActions, reportNameValuePairs, transactions, personalDetails, session, policies],
{currentValue, sourceValues, areAllConnectionsSet},
) => {
if (!areAllConnectionsSet) {
Expand Down Expand Up @@ -219,7 +220,9 @@ export default createOnyxDerivedValueConfig({
}

acc[report.reportID] = {
reportName: report ? computeReportName(report, reports, policies, transactions, reportNameValuePairs, personalDetails, reportActions) : '',
reportName: report
? computeReportName(report, reports, policies, transactions, reportNameValuePairs, personalDetails, reportActions, session?.accountID ?? CONST.DEFAULT_NUMBER_ID)
: '',
isEmpty: generateIsEmptyReport(report, isReportArchived),
brickRoadStatus,
requiresAttention,
Expand Down
9 changes: 5 additions & 4 deletions src/pages/Search/AdvancedSearchFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type {SearchAmountFilterKeys, SearchDateFilterKeys, SearchDatePreset, Sea
import SpacerView from '@components/SpacerView';
import Text from '@components/Text';
import useAdvancedSearchFilters from '@hooks/useAdvancedSearchFilters';
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import useSingleExecution from '@hooks/useSingleExecution';
Expand Down Expand Up @@ -527,9 +528,9 @@ function getFilterExpenseDisplayTitle(filters: Partial<SearchAdvancedFiltersForm
: undefined;
}

function getFilterInDisplayTitle(filters: Partial<SearchAdvancedFiltersForm>, _: LocaleContextProps['translate'], reports?: OnyxCollection<Report>) {
function getFilterInDisplayTitle(filters: Partial<SearchAdvancedFiltersForm>, _: LocaleContextProps['translate'], reports: OnyxCollection<Report> | undefined, currentUserAccountID: number) {
return filters.in
?.map((id) => computeReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${id}`], reports))
?.map((id) => computeReportName(reports?.[`${ONYXKEYS.COLLECTION.REPORT}${id}`], reports, undefined, undefined, undefined, undefined, undefined, currentUserAccountID))
?.filter(Boolean)
?.join(', ');
}
Expand All @@ -548,8 +549,8 @@ function AdvancedSearchFilters() {
const personalDetails = usePersonalDetails();

const [policies = getEmptyObject<NonNullable<OnyxCollection<Policy>>>()] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: false});

const [currentUserLogin] = useOnyx(ONYXKEYS.SESSION, {canBeMissing: false, selector: emailSelector});
const {accountID: currentUserAccountID} = useCurrentUserPersonalDetails();

const taxRates = getAllTaxRates(policies);

Expand Down Expand Up @@ -609,7 +610,7 @@ function AdvancedSearchFilters() {
) {
filterTitle = baseFilterConfig[key].getTitle(searchAdvancedFilters[key] ?? [], personalDetails, formatPhoneNumber);
} else if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.IN) {
filterTitle = baseFilterConfig[key].getTitle(searchAdvancedFilters, translate, reports);
filterTitle = baseFilterConfig[key].getTitle(searchAdvancedFilters, translate, reports, currentUserAccountID);
} else if (key === CONST.SEARCH.SYNTAX_FILTER_KEYS.POLICY_ID) {
const workspacesData = workspaces.flatMap((value) => value.data);
filterTitle = baseFilterConfig[key].getTitle(searchAdvancedFilters, workspacesData);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/iou/SplitExpenseEditPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function SplitExpenseEditPage({route}: SplitExpensePageProps) {
const [policyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}${currentReport?.policyID}`, {canBeMissing: false});

const [policyTags] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_TAGS}${currentReport?.policyID}`, {canBeMissing: false});
const {login} = useCurrentUserPersonalDetails();
const {login, accountID: currentUserAccountID} = useCurrentUserPersonalDetails();

const fetchData = useCallback(() => {
if (!policyCategories) {
Expand Down Expand Up @@ -105,7 +105,7 @@ function SplitExpenseEditPage({route}: SplitExpensePageProps) {
const isSplitAvailable = report && transaction && isSplitAction(currentReport, [transaction], originalTransaction, login ?? '', currentPolicy);

const isCategoryRequired = !!currentPolicy?.requiresCategory;
const reportName = computeReportName(currentReport);
const reportName = computeReportName(currentReport, undefined, undefined, undefined, undefined, undefined, undefined, currentUserAccountID);
const isDescriptionRequired = isCategoryDescriptionRequired(policyCategories, splitExpenseDraftTransactionDetails?.category, currentPolicy?.areRulesEnabled);

const shouldShowTags = !!currentPolicy?.areTagsEnabled && !!(transactionTag || hasEnabledTags(policyTagLists));
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/OnyxDerivedTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ describe('OnyxDerived', () => {
const transaction = createRandomTransaction(1);

// When the report attributes are recomputed with both report and transaction updates
reportAttributes.compute([reports, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined], {areAllConnectionsSet: true});
const reportAttributesComputedValue = reportAttributes.compute([reports, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined], {
reportAttributes.compute([reports, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined], {areAllConnectionsSet: true});
const reportAttributesComputedValue = reportAttributes.compute([reports, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined], {
sourceValues: {
[ONYXKEYS.COLLECTION.REPORT]: {
[`${ONYXKEYS.COLLECTION.REPORT}${reportID1}`]: reports[`${ONYXKEYS.COLLECTION.REPORT}${reportID1}`],
Expand Down
Loading
Loading