Skip to content

Fix/switch chainnamespace on account switch#2485

Merged
chaitanyapotti merged 6 commits into
feat/link-ext-walletfrom
fix/switch-chainnamespace-on-account-switch
May 18, 2026
Merged

Fix/switch chainnamespace on account switch#2485
chaitanyapotti merged 6 commits into
feat/link-ext-walletfrom
fix/switch-chainnamespace-on-account-switch

Conversation

@lwin-kyaw
Copy link
Copy Markdown
Contributor

@lwin-kyaw lwin-kyaw commented May 18, 2026

Jira Link

Description

This PR prevent switching chain if the switched account chain namespace is the same as current connected chain namespace.

How has this been tested?

Screenshots (if appropriate)

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.

Note

Medium Risk
Changes account-switching chain resolution and connection reuse logic, which can affect wallet switching flows across EVM/Solana namespaces. Risk is mitigated by added/updated unit tests but could still impact edge cases in multi-chain setups.

Overview
Fixes account switching so the SDK does not unnecessarily change chains when switching to a linked account that shares the same chain namespace as the current active chain; processSwitchAccountResult now resolves a resolvedSwitchChainId and uses it for connector creation, connect, and setCurrentChain.

Also aligns code/tests with the newer primaryConnectorName/ConnectedAccountInfo naming (removing reliance on connectedConnectorName), and updates the demo dashboard to read chain ID from web3Auth.currentChain and gate wallet services off primaryConnectorName.

Reviewed by Cursor Bugbot for commit dc6724f. Bugbot is set up for automated code reviews on this repo. Configure here.

@lwin-kyaw lwin-kyaw requested review from a team as code owners May 18, 2026 09:33
@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

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

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment May 18, 2026 10:07am

Request Review

Copy link
Copy Markdown

@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.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4e1a921. Configure here.

Comment thread packages/no-modal/src/noModal.ts
@chaitanyapotti chaitanyapotti merged commit 46a26d8 into feat/link-ext-wallet May 18, 2026
4 checks passed
@chaitanyapotti chaitanyapotti deleted the fix/switch-chainnamespace-on-account-switch branch May 18, 2026 10:12
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.

2 participants