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 built-in networks switch-ethereum-chain, Including RPC url in switchEthereumChain requestData #11268

Merged
merged 4 commits into from Jun 9, 2021

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Jun 9, 2021

Related: #11184 - test plan should be similar

ryanml and others added 4 commits June 9, 2021 12:12
`switch-ethereum-chain` did not work correctly with built-in networks.
It was treating them as custom networks, rather than as built-in
networks. This affected how they were displayed in the network
dropdown, and resulted in slight differences to the network stack used
as well.

The problem was that `updateRpcTarget` was used, which was meant for
custom networks only. Now that `setProviderType` is used in the case of
a built-in network, the behaviour should match the network switcher
exactly.
@ryanml ryanml self-assigned this Jun 9, 2021
@ryanml ryanml requested a review from a team as a code owner June 9, 2021 20:31
Copy link
Member

@brad-decker brad-decker left a comment

Choose a reason for hiding this comment

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

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [92480f1]
Page Load Metrics (592 ± 49 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint47856494
domContentLoaded37373758810149
load37575459210249
domInteractive37373758810149

@ryanml ryanml merged commit a750927 into develop Jun 9, 2021
@ryanml ryanml deleted the switch-chain-rpc-fix branch June 9, 2021 22:18
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants