Skip to content

Commit

Permalink
temp+fix: fix duplicated network select (#11524)
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**
his PR introduces a fix for handling multiple networks with different
RPC URLs in the NetworkSelector component, along with comprehensive unit
tests to ensure the component's functionality. The tests verify that
only one network can be selected at a time, even when the networks have
the same chain ID but different RPC URLs.

<!--
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?
-->

## **Related issues**

Fixes: #11509 

## **Manual testing steps**

1. add tow different polygon network with two different rpc
2. switch between them

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**


https://github.com/user-attachments/assets/4870882d-0029-459a-ad91-f409ed552183


<!-- [screenshots/recordings] -->

### **After**



https://github.com/user-attachments/assets/1966eda3-2e10-4b93-babf-2afe3be48aed


<!-- [screenshots/recordings] -->

## **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**

- [ ] 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.
  • Loading branch information
runway-github[bot] authored Oct 2, 2024
1 parent d855104 commit b070e5c
Show file tree
Hide file tree
Showing 355 changed files with 9,793 additions and 20,897 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
Validating CODEOWNERS rules …
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 b070e5c

Please sign in to comment.