Skip to content

fix: empty login modal in external wallet only mode#2348

Merged
chaitanyapotti merged 6 commits intov10from
feat/empty-modal-when-no-AUTH
Feb 3, 2026
Merged

fix: empty login modal in external wallet only mode#2348
chaitanyapotti merged 6 commits intov10from
feat/empty-modal-when-no-AUTH

Conversation

@hieu-w
Copy link
Member

@hieu-w hieu-w commented Jan 26, 2026

Motivation and Context

Jira Link:
NA

Description

This PR changes:

  • fix empty modal in external wallet only mode
  • hide success connect screen for external wallet

How has this been tested?

Screenshots (if appropriate):

Before:
https://github.com/user-attachments/assets/af88d9ef-dfa2-4f57-8634-884eb4c9c287

After:
https://github.com/user-attachments/assets/ab9abf04-8378-469f-9682-230c9b88c984

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code requires a db migration.

Note

Medium Risk
Changes modal page-rendering conditions and demo configuration for external-wallet-only flows; regressions could affect which screens/buttons render for different login configurations.

Overview
Fixes the empty modal issue when only external wallets are available by updating Root.tsx to render the ConnectWallet screen even when showExternalWalletPage is true but the UI is effectively external-wallet-only.

Updates the Vue demo to support an externalWalletOnly setting end-to-end (form toggle, persisted state, typed config) that hides the auth connector on the modal and sets uiConfig.primaryButton to externalLogin when enabled.

Written by Cursor Bugbot for commit e5d16b3. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Feb 3, 2026 7:46am

Request Review

@chaitanyapotti
Copy link
Member

what's the context of this pr?

@hieu-w
Copy link
Member Author

hieu-w commented Jan 27, 2026

what's the context of this pr?

Bug: When initializing Web3Auth with AUTH connector hidden (external wallets only mode), the modal appears empty on first open. Close and reopen → wallets appear.

Example:

const web3authInstance = new Web3Auth({
  clientId: ...
  modalConfig: {
      hideWalletDiscovery: false,
      connectors: {
        [WALLET_CONNECTORS.AUTH]: {
          label: "Auth",
          showOnModal: false,
        },
      },
    },
});

await web3authInstance.init();
const provider = await web3authInstance.connect(); <~~ first time call this modal appear empty

Screen.Recording.2026-01-26.at.19.21.12.mov

@hieu-w
Copy link
Member Author

hieu-w commented Jan 27, 2026

Original condition:

  • modalState.currentPage === PAGES.CONNECT_WALLET && !showExternalWalletPage

Problem:

  • showExternalWalletPage = true when MetaMask is detected
  • When AUTH is hidden, modal starts on PAGES.LOGIN
  • Login screen has nothing to show (no social logins)
  • ConnectWallet doesn't render because showExternalWalletPage is true
  • Result: Empty screen

New condition:

  • modalState.currentPage === PAGES.CONNECT_WALLET && (!showExternalWalletPage || isExternalWalletModeOnly)

Why it works:

  • isExternalWalletModeOnly = true when AUTH is hidden
  • Even if showExternalWalletPage is true (MetaMask detected), the || isExternalWalletModeOnly bypasses it
  • ConnectWallet now renders in external-only mode
  • Result: Wallets appear

@tanguyenvn
Copy link
Contributor

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@chaitanyapotti
Copy link
Member

why are we hiding the success screen for external wallets?
i think in funding pr, we wanted to hide it and if so, we should make it a param

@chaitanyapotti chaitanyapotti changed the base branch from master to v10 February 2, 2026 11:45
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@hieu-w hieu-w force-pushed the feat/empty-modal-when-no-AUTH branch from ff132f6 to 84b3771 Compare February 3, 2026 07:38
@chaitanyapotti chaitanyapotti merged commit 706990d into v10 Feb 3, 2026
4 checks passed
@chaitanyapotti chaitanyapotti deleted the feat/empty-modal-when-no-AUTH branch February 3, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants