-
-
Notifications
You must be signed in to change notification settings - Fork 219
Add handling of Infura "blocked" status #1264
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
Conversation
5b1308e
to
dc14f06
Compare
This comment was marked as resolved.
This comment was marked as resolved.
2875383
to
af9cb2c
Compare
dc14f06
to
cbfd2d0
Compare
The network controller has been updated to detect when connecting to an Infura network fails due to the user being blocked. A new status has been added to reflect this state, and two events have been added (one for when a user is blocked, and one for when they are unblocked). This status and these events are used by the extension to better explain why the network is not working in this scenario. Fixes #1200
cbfd2d0
to
d83f829
Compare
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.
This looks good to me. One thing I'm noticing is that the unit tests here don't seem to be as exhaustive as the ones in extension. For instance, in the tests for initializeProvider
we not only test that the provider is set but also that infuraIsBlocked
or infuraIsUnblocked
is emitted and that the network status is updated, etc.. So there are more tests we could bring over in this PR as it relates to Infura blocked/unblocked. That said, we could also cover that sort of thing in #1197. The tests you've added seem sufficient to prove that the new code is working as intended.
Handling that as part of #1197 makes sense to me. I considered doing it here, but I wasn't sure if we wanted the final test suite to be organized that way. The way it's setup now (both in here and the extension) is... inconsistent and repetitive. We might want to factor our "lookupNetwork" behavioral tests into a function to more easily repeat them, or something like that. |
The network controller has been updated to detect when connecting to an Infura network fails due to the user being blocked. A new status has been added to reflect this state, and two events have been added (one for when a user is blocked, and one for when they are unblocked). This status and these events are used by the extension to better explain why the network is not working in this scenario. Fixes #1200
The network controller has been updated to detect when connecting to an Infura network fails due to the user being blocked. A new status has been added to reflect this state, and two events have been added (one for when a user is blocked, and one for when they are unblocked). This status and these events are used by the extension to better explain why the network is not working in this scenario. Fixes #1200
Description
The network controller has been updated to detect when connecting to an Infura network fails due to the user being blocked. A new status has been added to reflect this state, and two events have been added (one for when a user is blocked, and one for when they are unblocked).
This status and these events are used by the extension to better explain why the network is not working in this scenario.
Changes
References
Fixes #1200
Checklist