Skip to content

Conversation

@runway-github
Copy link
Contributor

@runway-github runway-github bot commented Aug 15, 2025

Description

The NetworkManager was calling setNetworkClientIdForDomain which would
signal a network change to the dapp. This is undesirable as it can cause
confusion with the user <-> dapp experience. This PR removes that
update.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Prevented the NetworkManager from changing the
dapp-selected network.

Related issues

Fixes: #35124

Manual testing steps

  1. Go to PancakeSwap

  2. Connect with Linea

  3. Open MetaMask, then the network manager, click the BSC checkbox

  4. DO NOT see the dapp change -- continues to cite Linea

  5. Go to PancakeSwap

  6. Open MetaMask, then click the favicon at the top right of the
    extension

  7. Change networks

  8. See network change reflected on dapp

Screenshots/Recordings

Before

After

Screen.Recording.2025-08-14.at.4.23.47.PM.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the
    app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described
    in the ticket it closes and includes the necessary testing evidence such
    as recordings and or screenshots.

Co-authored-by: Nicholas Gambino [email protected] c3acc5b

…ge from network manager (#35126)

## **Description**

The NetworkManager was calling `setNetworkClientIdForDomain` which would
signal a network change to the dapp. This is undesirable as it can cause
confusion with the user <-> dapp experience. This PR removes that
update.

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/35126?quickstart=1)

## **Changelog**

CHANGELOG entry: Prevented the NetworkManager from changing the
dapp-selected network.

## **Related issues**

Fixes:  #35124

## **Manual testing steps**

1. Go to PancakeSwap
2. Connect with Linea
3. Open MetaMask, then the network manager, click the BSC checkbox
4. DO NOT see the dapp change -- continues to cite Linea

1.  Go to PancakeSwap
2. Open MetaMask, then click the favicon at the top right of the
extension
3. Change networks
4. See network change reflected on dapp

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**



https://github.com/user-attachments/assets/bea630c7-7f4e-41b2-99c9-47f26e8b3141




## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Nicholas Gambino <[email protected]>
@runway-github runway-github bot requested a review from a team as a code owner August 15, 2025 00:39
@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead label Aug 15, 2025
@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

🖥️ @MetaMask/wallet-ux (2 files, +4 -49)
  • 📁 ui/
    • 📁 components/
      • 📁 multichain/
        • 📁 connected-site-popover/
          • 📄 connected-site-popover.tsx +1 -0
        • 📁 network-manager/
          • 📁 hooks/
            • 📄 useNetworkChangeHandlers.ts +3 -49

@metamaskbot
Copy link
Collaborator

Builds ready [e0071b8]
UI Startup Metrics (1155 ± 79 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1155102815037911961297
load97985912497210171105
domContentLoaded97184712407310101094
domInteractive17135361626
firstPaint6457212473899911069
backgroundConnect2142012598216231
firstReactRender2215168162133
getState1154871327
initialActions2053629
loadScripts765638102071803882
setupStore84284814
WebpackHomeuiStartup21611750259219822832506
load16221270191215716951857
domContentLoaded16151266189915616911840
domInteractive171188141354
firstPaint1796040463213295
backgroundConnect251376112754
firstReactRender20387397113366387
getState3143147510274
initialActions8228128512
loadScripts16111264188715416891828
setupStore2563026114282
FirefoxBrowserifyHomeuiStartup13281133174211213831570
load113498113847611991246
domContentLoaded113498013847611991246
domInteractive983344757101215
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2916132153148
firstReactRender24206072436
getState829012532
initialActions6017524323
loadScripts111396613687411711232
setupStore73507629
WebpackHomeuiStartup15381356211113215821815
load1293114116009613361484
domContentLoaded1293114116009613361484
domInteractive96323305597257
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3220120163385
firstReactRender50409285459
getState112114151139
initialActions3078829
loadScripts1268108014979613141464
setupStore94699729
Benchmark value 214 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 232 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 32 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 8 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 2506 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 387 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 274 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 12 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 282 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 7 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 215 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 32 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 23 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 29 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 33 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 51 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 257 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 85 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 59 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 39 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 9 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 29 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 244ms | Sum of p95 exceeds: 803.8ms
Sum of all benchmark exceeds: 1047.8ms

Copy link
Contributor

@gauthierpetetin gauthierpetetin left a comment

Choose a reason for hiding this comment

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

LGTM

@gauthierpetetin gauthierpetetin merged commit 51aede8 into Version-v13.1.0 Aug 15, 2025
143 checks passed
@gauthierpetetin gauthierpetetin deleted the runway-cherry-pick-13.1.0-1755218334 branch August 15, 2025 07:45
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2025
@metamaskbot metamaskbot added the release-13.1.0 Issue or pull request that will be included in release 13.1.0 label Aug 15, 2025
@metamaskbot
Copy link
Collaborator

No release label on PR. Adding release label release-13.1.0 on PR, as PR was cherry-picked in branch 13.1.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.1.0 Issue or pull request that will be included in release 13.1.0 team-runway-bot-deprecated DEPRECATED: please use "team-bots" instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants