From 695a6ec10367ae600da80db1e232deb8cc8a8aa2 Mon Sep 17 00:00:00 2001 From: Jacek Date: Mon, 29 Dec 2025 21:24:42 -0600 Subject: [PATCH] fix(ui): Remove Personal Account web3 id --- .../OrganizationList/UserMembershipList.tsx | 2 +- .../OrganizationSwitcherPopover.tsx | 2 +- .../OrganizationSwitcherTrigger.tsx | 2 +- .../OrganizationSwitcher/UserMembershipList.tsx | 2 +- .../__tests__/OrganizationSwitcher.test.tsx | 16 ++++++++++++++++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/components/OrganizationList/UserMembershipList.tsx b/packages/ui/src/components/OrganizationList/UserMembershipList.tsx index 48e9029515c..a7dec64439b 100644 --- a/packages/ui/src/components/OrganizationList/UserMembershipList.tsx +++ b/packages/ui/src/components/OrganizationList/UserMembershipList.tsx @@ -82,7 +82,7 @@ export const PersonalAccountPreview = withCardStateProvider(() => { return null; } - const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user; + const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user; const handlePersonalClicked = () => { if (!isLoaded) { diff --git a/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx b/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx index aec8b0f21de..886df9d9ef0 100644 --- a/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx +++ b/packages/ui/src/components/OrganizationSwitcher/OrganizationSwitcherPopover.tsx @@ -48,7 +48,7 @@ export const OrganizationSwitcherPopover = React.forwardRef { return null; } - const { username, primaryEmailAddress, primaryPhoneNumber, ...userWithoutIdentifiers } = user; + const { primaryEmailAddress, primaryPhoneNumber, primaryWeb3Wallet, username, ...userWithoutIdentifiers } = user; const { isLoading, hasNextPage } = userMemberships; diff --git a/packages/ui/src/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx b/packages/ui/src/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx index 7f9a6d32169..20ace5aa325 100644 --- a/packages/ui/src/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx +++ b/packages/ui/src/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx @@ -97,6 +97,22 @@ describe('OrganizationSwitcher', () => { expect(getByText('Personal account')).toBeInTheDocument(); }); + it('does not show user identifiers in the personal workspace trigger', async () => { + const { wrapper, props } = await createFixtures(f => { + f.withOrganizations(); + f.withUser({ + email_addresses: ['test@clerk.com'], + username: 'testuser', + }); + }); + + props.setProps({ hidePersonal: false }); + const { getByText, queryByText } = render(, { wrapper }); + expect(getByText('Personal account')).toBeInTheDocument(); + expect(queryByText('test@clerk.com')).not.toBeInTheDocument(); + expect(queryByText('testuser')).not.toBeInTheDocument(); + }); + it('shows "No organization selected" when user has no active organization and hidePersonal is true', async () => { const { wrapper, props } = await createFixtures(f => { f.withOrganizations();