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: Fix wallet_switchEthereumChain chainId validation #8883

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Mar 8, 2024

Description

This PR makes wallet_switchEthereumChain chainId validation better

Related issues

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@jiexi jiexi requested a review from a team as a code owner March 8, 2024 00:28
Copy link
Contributor

github-actions bot commented Mar 8, 2024

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.

@jiexi jiexi changed the title Fix wallet_switchEthereumChain chainId ReDos fix: Fix wallet_switchEthereumChain chainId ReDos Mar 8, 2024
@jiexi jiexi changed the title fix: Fix wallet_switchEthereumChain chainId ReDos fix: Fix wallet_switchEthereumChain chainId validation Mar 8, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.23%. Comparing base (c02483c) to head (19b04f0).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8883   +/-   ##
=======================================
  Coverage   43.23%   43.23%           
=======================================
  Files        1271     1271           
  Lines       30905    30905           
  Branches     3088     3088           
=======================================
  Hits        13361    13361           
  Misses      16769    16769           
  Partials      775      775           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

sonarcloud bot commented Mar 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jiexi jiexi merged commit 1441829 into main Mar 8, 2024
41 of 43 checks passed
@jiexi jiexi deleted the jl/mp-1588/fix-wallet_switchEthereumChain-redos branch March 8, 2024 17:04
@github-actions github-actions bot locked and limited conversation to collaborators Mar 8, 2024
@metamaskbot metamaskbot added the release-7.19.0 Issue or pull request that will be included in release 7.19.0 label Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.19.0 Issue or pull request that will be included in release 7.19.0 team-wallet-api-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants