-
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
Support hex and number net_version
responses
#19156
Conversation
Note that the lint failure appears to be on Edit: Fixed in this PR: #19157 |
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.
One minor thing but makes sense to me regardless.
], | ||
stubLookupNetworkWhileSetting: true, | ||
}); | ||
const validNetworkIds = [12345, '12345', toHex(12345)]; |
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.
Nit: Is it worth adding a test for an invalid network ID? Could do this in a new PR as well.
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.
Good thought, but we already covered this below (using the id invalid
).
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
Hex and number responses from the `net_version` request are now accepted. While most chains return decimal strings for this request, some chains were returning hex responses instead and failing our validation for this request (which was added in v10.30.0). This resolves that problem. Support for number responses was added because it likely worked in older versions as well, so support is maintained to avoid similar problems. Fixes #19151
5616f6b
to
fa4f45f
Compare
Thank you folks from SKALE! |
Builds ready [fa4f45f]
Page Load Metrics (1672 ± 33 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Explanation
Hex and number responses from the
net_version
request are now accepted. While most chains return decimal strings for this request, some chains were returning hex responses instead and failing our validation for this request (which was added in v10.30.0). This resolves that problem.Support for number responses was added because it likely worked in older versions as well, so support is maintained to avoid similar problems.
Fixes #19151
Manual Testing Steps
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.