-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
chore: fix: prevent bad svg urls in react-native-svg (#8102) #8134
Conversation
## **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](https://app.zenhub.com/workspaces/metamask-mobile-5f984938ddc0e4001d4b79cb/issues/gh/metamask/mobile-planning/1431) ## **Manual testing steps** 1. In-app browser --> Go to [https://btc20.com/](https://btc20.com/) 2. Connect to dapp with WC 3. Should not error ## **Screenshots/Recordings** ### WC connect to site with bad meta url https://github.com/MetaMask/metamask-mobile/assets/141057783/a1645016-6814-4be6-b027-d085856bad79 ### Search Bar icons https://github.com/MetaMask/metamask-mobile/assets/141057783/0328e3f3-7b60-440b-8667-72156c5667cc ### Tab Bar icons https://github.com/MetaMask/metamask-mobile/assets/141057783/e1bc694b-68fe-417f-b493-97c6f066690f ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). 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. --------- Co-authored-by: Chris Wilcox <[email protected]>
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. |
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
E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/dbb3786f-b020-4b76-b123-0ca42ece23e7 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/7.12.3 #8134 +/- ##
=================================================
Coverage ? 37.38%
=================================================
Files ? 1052
Lines ? 28172
Branches ? 2517
=================================================
Hits ? 10533
Misses ? 17040
Partials ? 599 ☔ View full report in Codecov by Sentry. |
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
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
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
Pre-merge reviewer checklist
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist