Skip to content

Commit aa27aa9

Browse files
committed
Fix: Authorized payer is displayed as phone [email protected]
1 parent 4fbf1b9 commit aa27aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/workspace/workflows/WorkspaceWorkflowsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import {getLatestErrorField} from '@libs/ErrorUtils';
3939
import Navigation from '@libs/Navigation/Navigation';
4040
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
4141
import {getPaymentMethodDescription} from '@libs/PaymentUtils';
42-
import {getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils';
42+
import {getDisplayNameOrDefault, getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils';
4343
import {
4444
getCorrectedAutoReportingFrequency,
4545
hasDynamicExternalWorkflow,
@@ -104,7 +104,7 @@ function WorkspaceWorkflowsPage({policy, route}: WorkspaceWorkflowsPageProps) {
104104
const isAdvanceApproval = (approvalWorkflows.length > 1 || (approvalWorkflows?.at(0)?.approvers ?? []).length > 1) && isControlPolicy(policy);
105105
const updateApprovalMode = isAdvanceApproval ? CONST.POLICY.APPROVAL_MODE.ADVANCED : CONST.POLICY.APPROVAL_MODE.BASIC;
106106
const displayNameForAuthorizedPayer = useMemo(
107-
() => getPersonalDetailByEmail(policy?.achAccount?.reimburser ?? '')?.displayName ?? policy?.achAccount?.reimburser,
107+
() => getDisplayNameOrDefault(getPersonalDetailByEmail(policy?.achAccount?.reimburser ?? ''), policy?.achAccount?.reimburser),
108108
[policy?.achAccount?.reimburser],
109109
);
110110

0 commit comments

Comments
 (0)