Skip to content

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

Resolves empty modal when using external-wallet-only mode and streamlines post-connect UX.

  • Adjusts Root.tsx to render ConnectWallet when PAGES.CONNECT_WALLET and either external page isn’t shown or isExternalWalletModeOnly is true, fixing the empty modal state
  • Updates Loader.tsx to immediately close on external wallet connect (0 ms) while keeping a 1s delay for social logins
  • Demo app: adds "External Wallet Only" tab and ExternalWalletOnlyTest.vue to exercise isolated external-wallet flow; hides main connect button on that tab
  • Bumps @web3auth/modal to 10.13.1 and @web3auth/no-modal to 10.13.0 in demo lockfile

Written by Cursor Bugbot for commit 4f93318. 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 Review Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jan 26, 2026 4:48pm

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

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.

4 participants