Skip to content

Commit 1aa5bb6

Browse files
feat(clerk-js): Remove web3 providers from sign up continue step (clerk#5036)
1 parent cf23178 commit 1aa5bb6

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

.changeset/new-adults-admire.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/clerk-js': patch
3+
---
4+
5+
Removes web3 provider options from progressive sign up step. web3 providers don't have the ability to fill in missing fields.

packages/clerk-js/src/ui/components/SignUp/SignUpContinue.tsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ function _SignUpContinue() {
109109

110110
const hasEmail = !!formState.emailAddress.value;
111111
const hasVerifiedExternalAccount = signUp.verifications?.externalAccount?.status == 'verified';
112-
const hasVerifiedWeb3 = signUp.verifications?.web3Wallet?.status == 'verified';
113112

114113
const fields = determineActiveFields({
115114
attributes,
@@ -122,7 +121,6 @@ function _SignUpContinue() {
122121
minimizeFieldsForExistingSignup(fields, signUp);
123122

124123
const oauthOptions = userSettings.authenticatableSocialStrategies;
125-
const web3Options = userSettings.web3FirstFactors;
126124

127125
const handleChangeActive = (type: ActiveIdentifier) => {
128126
if (!emailOrPhone(attributes, isProgressiveSignUp)) {
@@ -184,7 +182,6 @@ function _SignUpContinue() {
184182

185183
const canToggleEmailPhone = emailOrPhone(attributes, isProgressiveSignUp);
186184
const showOauthProviders = !hasVerifiedExternalAccount && oauthOptions.length > 0;
187-
const showWeb3Providers = !hasVerifiedWeb3 && web3Options.length > 0;
188185

189186
const headerTitle = !onlyLegalConsentMissing
190187
? localizationKeys('signUp.continue.title')
@@ -209,10 +206,10 @@ function _SignUpContinue() {
209206
gap={8}
210207
>
211208
<SocialButtonsReversibleContainerWithDivider>
212-
{(showOauthProviders || showWeb3Providers) && !onlyLegalConsentMissing && (
209+
{showOauthProviders && !onlyLegalConsentMissing && (
213210
<SignUpSocialButtons
214211
enableOAuthProviders={showOauthProviders}
215-
enableWeb3Providers={showWeb3Providers}
212+
enableWeb3Providers={false}
216213
continueSignUp
217214
/>
218215
)}

packages/clerk-js/src/ui/components/SignUp/__tests__/SignUpContinue.test.tsx

+12
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ describe('SignUpContinue', () => {
108108
screen.getByText(`Continue with ${name}`);
109109
});
110110

111+
it('does not render web3 providers', async () => {
112+
const { wrapper } = await createFixtures(f => {
113+
f.withUsername({ required: true });
114+
f.startSignUpWithEmailAddress();
115+
f.withSocialProvider({ provider: 'google' });
116+
f.withWeb3Wallet();
117+
});
118+
119+
const { queryByAltText } = render(<SignUpContinue />, { wrapper });
120+
expect(queryByAltText(/sign in with metamask/i)).not.toBeInTheDocument();
121+
});
122+
111123
it('renders error for invalid username length', async () => {
112124
const { wrapper, fixtures } = await createFixtures(f => {
113125
f.withEmailAddress({ required: true });

0 commit comments

Comments
 (0)