-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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: Gracefully handle bad responses from net_version
calls to RPC endpoint when getting Provider Network State
#27509
fix: Gracefully handle bad responses from net_version
calls to RPC endpoint when getting Provider Network State
#27509
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. |
Builds ready [3d4a7e2]
Page Load Metrics (1680 ± 80 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
|
Builds ready [5e7f833]
Page Load Metrics (1846 ± 128 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
Builds ready [5165b03]
Page Load Metrics (1768 ± 90 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!
Builds ready [19060cc]
Page Load Metrics (2062 ± 108 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Currently some users are seeing
Error: Cannot parse as a valid network ID: 'undefined'
errors when connected to RPC endpoints that fail to provide a value fromnet_version
calls that can be parsed into a decimal string. This PR makes our internally handling of this case more flexibly by usingnull
as the network version value sent to the inpage provider when receiving an unexpectednet_version
call value.Related issues
Fixes: #27487
Manual testing steps
JsonRpcError: MetaMask: Disconnected from chain. Attempting to connect.
window.ethereum.request
works as expected despite thisScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist