-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Get infuraBlocked from network state #20822
Get infuraBlocked from network state #20822
Conversation
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 update-policies |
Policy update failed. You can review the logs or retry the policy update here |
@metamaskbot update-policies |
Policies updated |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #20822 +/- ##
===========================================
- Coverage 68.35% 68.34% -0.02%
===========================================
Files 1007 1007
Lines 40261 40254 -7
Branches 10766 10761 -5
===========================================
- Hits 27519 27508 -11
- Misses 12742 12746 +4
☔ View full report in Codecov by Sentry. |
Builds ready [f0e8e6e]
Page Load Metrics (1744 ± 121 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [cd7d8e6]
Page Load Metrics (1498 ± 37 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Maybe we should add a test for the selector but otherwise looks good. Manually tested as well!
Builds ready [2d13a1d]
Page Load Metrics (1591 ± 88 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
@metamaskbot update-policies |
Policies updated |
Builds ready [888a247]
Page Load Metrics (1709 ± 76 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [888a247]
Page Load Metrics (1709 ± 76 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [888a247]
Page Load Metrics (1709 ± 76 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [3b998b6]
Page Load Metrics (1624 ± 61 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [dc5436a]
Page Load Metrics (1672 ± 60 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [623a52e]
Page Load Metrics (1602 ± 49 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Builds ready [14a02e1]
Page Load Metrics (1845 ± 86 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Currently, infuraBlocked is managed via the PreferencesController through the
NetworkController:infuraIsBlocked
andNetworkController:infuraIsUnblocked
events. As part of multichain work, we want to move away from a globally selected network. This PR removesstate.metamask.infuraBlocked
and checksstate.metamask.networksMetadata
for network status instead. This still checks the currently the state for the selected network only though.Explanation
Screenshots/Screencaps
Before
After
Manual Testing Steps
Not super easy to test manually as you will need to use a VPN to connect from a location where infura is blocked or some how catch and modify the initial wallet rpc request to return a blocked error. You should see the infura blocked popup on the main wallet homepage when you have selected an infura RPC while connecting from a blocked location
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.