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: prevent bad svg urls in react-native-svg #8102

Merged
merged 3 commits into from
Dec 15, 2023

Conversation

frankvonhoven
Copy link
Contributor

Description

Some dapps had bad icon urls in their metadata which prevented rendering favicon properly. This PR adds a patch to react-native-svg to prevent trying to render invalid svg urls.

Related issues

Fixes: #1431

Manual testing steps

  1. In-app browser --> Go to https://btc20.com/
  2. Connect to dapp with WC
  3. Should not error

Screenshots/Recordings

WC connect to site with bad meta url

svg-wc.mp4

Search Bar icons

svg-search.mp4

Tab Bar icons

svg-tabs.mp4

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.

@frankvonhoven frankvonhoven added needs-qa Any New Features that needs a full manual QA prior to being added to a release. needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) team-mobile-client labels Dec 15, 2023
@frankvonhoven frankvonhoven requested a review from a team as a code owner December 15, 2023 00:37
Copy link
Contributor

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.

@codecov-commenter
Copy link

codecov-commenter commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fd98095) 39.39% compared to head (8169316) 39.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8102   +/-   ##
=======================================
  Coverage   39.39%   39.39%           
=======================================
  Files        1220     1220           
  Lines       29800    29800           
  Branches     2831     2831           
=======================================
  Hits        11740    11740           
  Misses      17371    17371           
  Partials      689      689           

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

Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/e6fe0214-706d-4752-a969-087d40f47249
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

tommasini
tommasini previously approved these changes Dec 15, 2023
Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

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

LGTM!

@chrisleewilcox chrisleewilcox added QA in Progress QA has started on the feature. and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. labels Dec 15, 2023
@metamaskbot metamaskbot added needs-qa Any New Features that needs a full manual QA prior to being added to a release. and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Dec 15, 2023
@chrisleewilcox chrisleewilcox added QA Passed A successful QA run through has been done and removed needs-qa Any New Features that needs a full manual QA prior to being added to a release. QA in Progress QA has started on the feature. labels Dec 15, 2023
Copy link

sonarcloud bot commented Dec 15, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

LGTM

@chrisleewilcox chrisleewilcox merged commit ca25073 into main Dec 15, 2023
26 checks passed
@chrisleewilcox chrisleewilcox deleted the hotfix/1431-browser-app-crash-on-some-dapps branch December 15, 2023 19:46
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2023
@metamaskbot metamaskbot added the release-7.15.0 Issue or pull request that will be included in release 7.15.0 label Dec 15, 2023
@sethkfman sethkfman added release-7.12.3 Issue or pull request that will be included in release 7.12.3 and removed release-7.15.0 Issue or pull request that will be included in release 7.15.0 labels Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
QA Passed A successful QA run through has been done release-7.12.3 Issue or pull request that will be included in release 7.12.3 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants