From a929ff946b4a0fc43d7aba19e757c112637f8a49 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 29 Jan 2025 08:48:03 -0500 Subject: [PATCH 1/4] feat(clerk-js): Remove web3 providers from sign up continue step --- .../clerk-js/src/ui/components/SignUp/SignUpContinue.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx b/packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx index a80b32a90e4..ed1f976c75b 100644 --- a/packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx +++ b/packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx @@ -109,7 +109,6 @@ function _SignUpContinue() { const hasEmail = !!formState.emailAddress.value; const hasVerifiedExternalAccount = signUp.verifications?.externalAccount?.status == 'verified'; - const hasVerifiedWeb3 = signUp.verifications?.web3Wallet?.status == 'verified'; const fields = determineActiveFields({ attributes, @@ -122,7 +121,6 @@ function _SignUpContinue() { minimizeFieldsForExistingSignup(fields, signUp); const oauthOptions = userSettings.authenticatableSocialStrategies; - const web3Options = userSettings.web3FirstFactors; const handleChangeActive = (type: ActiveIdentifier) => { if (!emailOrPhone(attributes, isProgressiveSignUp)) { @@ -184,7 +182,6 @@ function _SignUpContinue() { const canToggleEmailPhone = emailOrPhone(attributes, isProgressiveSignUp); const showOauthProviders = !hasVerifiedExternalAccount && oauthOptions.length > 0; - const showWeb3Providers = !hasVerifiedWeb3 && web3Options.length > 0; const headerTitle = !onlyLegalConsentMissing ? localizationKeys('signUp.continue.title') @@ -209,10 +206,10 @@ function _SignUpContinue() { gap={8} > - {(showOauthProviders || showWeb3Providers) && !onlyLegalConsentMissing && ( + {showOauthProviders && !onlyLegalConsentMissing && ( )} From 2ec64ea8f06bebd0c1e15e5029781f49a2ff03aa Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 29 Jan 2025 08:51:47 -0500 Subject: [PATCH 2/4] add changeset --- .changeset/new-adults-admire.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/new-adults-admire.md diff --git a/.changeset/new-adults-admire.md b/.changeset/new-adults-admire.md new file mode 100644 index 00000000000..1b2b44c627c --- /dev/null +++ b/.changeset/new-adults-admire.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Removes web3 provider options from progressive sign up step. web3 providers don't have the ability to fill in missing fields. From 46c6536852be3caca842363a82d582901b80d3ea Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 29 Jan 2025 10:13:20 -0500 Subject: [PATCH 3/4] add test --- .../SignUp/__tests__/SignUpContinue.test.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx b/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx index 0db3dc269a8..92ec15d6176 100644 --- a/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx +++ b/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx @@ -108,6 +108,17 @@ describe('SignUpContinue', () => { screen.getByText(`Continue with ${name}`); }); + it('does not render web3 providers', async () => { + const { wrapper } = await createFixtures(f => { + f.withEmailAddress({ required: true }); + f.withPassword({ required: true }); + f.withWeb3Wallet(); + }); + + const { queryByAltText } = render(, { wrapper }); + expect(queryByAltText(/sign in with metamask/i)).not.toBeInTheDocument(); + }); + it('renders error for invalid username length', async () => { const { wrapper, fixtures } = await createFixtures(f => { f.withEmailAddress({ required: true }); From e7937d87b4bf132f36790b1a9c00d62f0eb54ba0 Mon Sep 17 00:00:00 2001 From: Alex Carpenter Date: Wed, 29 Jan 2025 11:21:30 -0500 Subject: [PATCH 4/4] fix test --- .../ui/components/SignUp/__tests__/SignUpContinue.test.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx b/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx index 92ec15d6176..f5cba43c003 100644 --- a/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx +++ b/packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx @@ -110,8 +110,9 @@ describe('SignUpContinue', () => { it('does not render web3 providers', async () => { const { wrapper } = await createFixtures(f => { - f.withEmailAddress({ required: true }); - f.withPassword({ required: true }); + f.withUsername({ required: true }); + f.startSignUpWithEmailAddress(); + f.withSocialProvider({ provider: 'google' }); f.withWeb3Wallet(); });