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: selected network when there are two with the same chain id. #25805

Merged
merged 17 commits into from
Jul 19, 2024

Conversation

montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Jul 12, 2024

Description

This PR fixes the issue when there are two networks with the same chain id and the default network is selected.

Related issues

Fixes: #25763

Manual testing steps

  1. Add a custom network with the chain id of 1
  2. Switch to this network
  3. See that it is selected.

Screenshots/Recordings

Before

Screenshot 2024-07-12 at 22 47 14

After

Screenshot 2024-07-12 at 22 50 50

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.

@montelaidev montelaidev requested review from a team as code owners July 12, 2024 14:53
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.

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.69%. Comparing base (8574f94) to head (46b22c1).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #25805      +/-   ##
===========================================
+ Coverage    69.69%   69.69%   +0.01%     
===========================================
  Files         1401     1401              
  Lines        49577    49590      +13     
  Branches     13701    13707       +6     
===========================================
+ Hits         34548    34561      +13     
  Misses       15029    15029              

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

@metamaskbot
Copy link
Collaborator

Builds ready [c9bc7c6]
Page Load Metrics (219 ± 215 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint641891032713
domContentLoaded10432594
load451596219448215
domInteractive10432594
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 96 Bytes (0.00%)
  • common: 431 Bytes (0.01%)

ui/selectors/multichain.ts Show resolved Hide resolved
ui/components/multichain/app-header/app-header.test.js Outdated Show resolved Hide resolved
ui/components/multichain/app-header/app-header.test.js Outdated Show resolved Hide resolved
ui/selectors/multichain.test.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.test.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
montelaidev and others added 3 commits July 16, 2024 22:58
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
@georgewrmarshall
Copy link
Contributor

georgewrmarshall commented Jul 18, 2024

Hey @montelaidev, did you specifically ask for @MetaMask/design-system-engineers review for this PR? Trying to figure out why we got tagged as code owners here. Happy for our team to review if so

@montelaidev
Copy link
Contributor Author

Hey @montelaidev, did you specifically ask for @MetaMask/design-system-engineers review for this PR? Trying to figure out why we got tagged as code owners here. Happy for our team to review if so

Hey @georgewrmarshall, there was a change in a design system component that was reverted. I think its ok now, we can remove @MetaMask/design-system-engineers from the reviewers. Thanks for checking in!

@montelaidev montelaidev removed the request for review from a team July 19, 2024 03:43
@metamaskbot
Copy link
Collaborator

Builds ready [b741527]
Page Load Metrics (325 ± 281 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint761661142211
domContentLoaded96830178
load411797325586281
domInteractive96830178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 96 Bytes (0.00%)
  • common: 418 Bytes (0.01%)

montelaidev and others added 2 commits July 19, 2024 18:00
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
@metamaskbot
Copy link
Collaborator

Builds ready [cd9e0b7]
Page Load Metrics (157 ± 168 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791511062010
domContentLoaded106832157
load451676157349168
domInteractive106832157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 96 Bytes (0.00%)
  • common: 434 Bytes (0.01%)

ui/selectors/multichain.ts Show resolved Hide resolved
ui/selectors/multichain.ts Outdated Show resolved Hide resolved
montelaidev and others added 2 commits July 19, 2024 21:43
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
@darkwing
Copy link
Contributor

Do we know how/when this regressed? Please test re: v12, 12.1, etc, because this is problematic

@montelaidev
Copy link
Contributor Author

Do we know how/when this regressed? Please test re: v12, 12.1, etc, because this is problematic

It looks like it is in v12.1 from this 3595052 commit when it started using the multichain networks from this b3c810e commit

@metamaskbot
Copy link
Collaborator

Builds ready [1e3ee98]
Page Load Metrics (140 ± 155 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint72154982311
domContentLoaded97028168
load381549140324155
domInteractive97028168
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 96 Bytes (0.00%)
  • common: 434 Bytes (0.01%)

Copy link

sonarcloud bot commented Jul 19, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [46b22c1]
Page Load Metrics (458 ± 384 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint652201203818
domContentLoaded96626136
load452954458799384
domInteractive96626136
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 96 Bytes (0.00%)
  • common: 434 Bytes (0.01%)

@montelaidev montelaidev merged commit 43b8031 into develop Jul 19, 2024
79 checks passed
@montelaidev montelaidev deleted the fix/multichain-network-picker branch July 19, 2024 16:08
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
@metamaskbot metamaskbot added the release-12.3.0 Issue or pull request that will be included in release 12.3.0 label Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.3.0 Issue or pull request that will be included in release 12.3.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Network name is showing incorrectly after adding Tenderly as custom network
6 participants