Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (cherry-pick): UX: NetworkList: Ensure setNetworkClientIdForDomain is called for test networks (#25184) #25260

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

darkwing
Copy link
Contributor

@darkwing darkwing commented Jun 12, 2024

Description

Cuts down the duplication of the NetworkListItem and ensures that setNetworkClientIdForDomain is called for test networks so that manually choosing a test network sends a signal to the dapp to change chain.

PR: #25195
Commit Hash:
c67aa3f

There were no merge conflicts when picking these commits.

[![Open in GitHub

Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/25070?quickstart=1)

Related issues

Fixes: The current Profile Syncing Feature doesn't fully respect Basic
Functionality when turned off. This ensures that the notifications
feature and profile syncing are actually turned off when Basic
Functionality if off.

Manual testing steps

  1. Go to a given dapp, connect using Ethereum Mainnet
  2. Manually open MetaMask, click the network picker, choose Sepolia
  3. See dapp change to sepolia

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding
    Standards
    .
  • 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 format
    if applicable
  • I’ve applied the right labels on the PR (see labeling
    guidelines
    ).
    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.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

Description

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

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.

## **Description**

This PR removes duplicate code for NetworkListItem creation, instead
using a helper function to create a single item.

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

## **Related issues**

Fixes: N/A

## **Manual testing steps**

1. Click "Polygon" and see chain switch to Polygon
2. Click "Ethereum Mainnet" and see chain switch to Ethereum Mainnet
3. Drag and drop networks around -- should work
4. Click the toggle to view test networks
5. Click a test network -- should change to correct network

## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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

## **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/develop/.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/develop/.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: Brian Bergeron <[email protected]>
Co-authored-by: Nidhi Kumari <[email protected]>
@darkwing darkwing requested a review from a team as a code owner June 12, 2024 15:25
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
Copy link
Collaborator

Builds ready [7fdad36]
Page Load Metrics (44 ± 2 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint59857673
domContentLoaded814911
load40574442
domInteractive814911
Bundle size diffs [🚀 Bundle size reduced!]
  • background: 22 Bytes (0.00%)
  • ui: 6.5 KiB (0.10%)
  • common: -3.04 KiB (-0.05%)

Copy link

codecov bot commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 65.60%. Comparing base (ba5c428) to head (7fdad36).
Report is 24 commits behind head on Version-v12.0.0.

Files Patch % Lines
.../multichain/network-list-menu/network-list-menu.js 70.00% 6 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           Version-v12.0.0   #25260      +/-   ##
===================================================
+ Coverage            65.58%   65.60%   +0.01%     
===================================================
  Files                 1360     1360              
  Lines                54152    54143       -9     
  Branches             14080    14075       -5     
===================================================
+ Hits                 35514    35516       +2     
+ Misses               18638    18627      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@darkwing darkwing added release-blocker This bug is blocking the next release release-12.0.0 Issue or pull request that will be included in release 12.0.0 labels Jun 14, 2024
@danjm danjm merged commit aba68fd into Version-v12.0.0 Jun 14, 2024
80 of 81 checks passed
@danjm danjm deleted the Version-v12.0.0-cherry-pick-mc-test-networks branch June 14, 2024 20:58
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.0.0 Issue or pull request that will be included in release 12.0.0 release-blocker This bug is blocking the next release
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants