Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(runway): cherry-pick fix: Fix invalid browser url crash (#11583)
- fix: Fix invalid browser url crash (#11581) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR fixes the crash in 7.32.0 for invalid URL in browser. The global `URL` didn't catch invalid urls gracefully, so we are using the lib `url-parser` ## **Related issues** Fixes: #11479 ## **Manual testing steps** 1. Go to browser 2. Enter `httttps://app.uniswap.org` 3. Website shows invalid url scheme 4. App doesn't crash ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/2980c632-ed4b-48a4-976c-b1da54c590ce ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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. [e80a1e8](e80a1e8) Co-authored-by: Cal Leung <[email protected]>
- Loading branch information