Skip to content

Commit

Permalink
temp+fix: Fix invalid browser url crash (#11581)
Browse files Browse the repository at this point in the history
<!--
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.
  • Loading branch information
runway-github[bot] authored Oct 2, 2024
1 parent 4092f86 commit 5d5396f
Show file tree
Hide file tree
Showing 384 changed files with 9,953 additions and 21,790 deletions.
2 changes: 0 additions & 2 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ ignores:
- 'webpack-cli'
- '@react-native-community/datetimepicker'
- '@react-native-community/slider'
- 'patch-package'
- '@lavamoat/allow-scripts'
# This is used on the patch for TokenRatesController of Assets controllers, for we to be able to use the last version of it
- cockatiel

Expand Down
29 changes: 0 additions & 29 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -63,32 +63,3 @@ patches/react-native+0.*.patch @MetaMask/supply-chain

# Staking Team
app/components/UI/Stake @MetaMask/metamask-staking

# Assets Team
app/components/hooks/useIsOriginalNativeTokenSymbol @MetaMask/metamask-assets
app/components/hooks/useTokenBalancesController @MetaMask/metamask-assets
app/components/hooks/useTokenBalance.tsx @MetaMask/metamask-assets
app/components/hooks/useSafeChains.ts @MetaMask/metamask-assets
app/components/UI/AssetOverview @MetaMask/metamask-assets
app/components/UI/Collectibles @MetaMask/metamask-assets
app/components/UI/CollectibleContractElement @MetaMask/metamask-assets
app/components/UI/CollectivelContractInformation @MetaMask/metamask-assets
app/components/UI/CollectibleContractOverview @MetaMask/metamask-assets
app/components/UI/CollectibleContracts @MetaMask/metamask-assets
app/components/UI/CollectibleDetectionModal @MetaMask/metamask-assets
app/components/UI/CollectibleMedia @MetaMask/metamask-assets
app/components/UI/CollectibleModal @MetaMask/metamask-assets
app/components/UI/CollectibleOverview @MetaMask/metamask-assets
app/components/UI/ConfirmAddAsset @MetaMask/metamask-assets
app/components/UI/Tokens @MetaMask/metamask-assets
app/components/Views/AddAsset @MetaMask/metamask-assets
app/components/Views/Asset @MetaMask/metamask-assets
app/components/Views/AssetDetails @MetaMask/metamask-assets
app/components/Views/AssetHideConfirmation @MetaMask/metamask-assets
app/components/Views/AssetOptions @MetaMask/metamask-assets
app/components/Views/Collectible @MetaMask/metamask-assets
app/components/Views/CollectibleView @MetaMask/metamask-assets
app/components/Views/DetectedTokens @MetaMask/metamask-assets
app/components/Views/NFTAutoDetectionModal @MetaMask/metamask-assets
app/components/Views/NftDetails @MetaMask/metamask-assets
app/reducers/collectibles @MetaMask/metamask-assets
1 change: 0 additions & 1 deletion .github/scripts/bitrise/.yarnrc

This file was deleted.

32 changes: 0 additions & 32 deletions .github/scripts/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions .github/scripts/tsconfig.json

This file was deleted.

Loading

0 comments on commit 5d5396f

Please sign in to comment.