Skip to content

Commit

Permalink
fix: fix network selector bug (#12605)
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**
PR to fix network selector bug
<!--
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: #12423 

## **Manual testing steps**

1. Go to the network selector
2. Go to search input and search for a network
3. the input should not be hidden

## **Screenshots/Recordings**

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

### **Before**

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

### **After**




https://github.com/user-attachments/assets/d84daf89-8c41-4112-bacf-1b8a830e7d54



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

## **Pre-merge author checklist**

- [ ] 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).
- [ ] I've completed the PR template to the best of my ability
- [ ] 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.

## **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
salimtb authored Dec 18, 2024
1 parent a6b0197 commit e335f05
Show file tree
Hide file tree
Showing 4 changed files with 1,034 additions and 882 deletions.
22 changes: 22 additions & 0 deletions app/components/Views/NetworkSelector/NetworkSelector.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,28 @@ const createStyles = (colors: Colors) =>
fontSize: 10,
marginTop: 4,
},
screen: { justifyContent: 'flex-end' },
scrollableDescription: {
maxHeight: Device.getDeviceHeight() * 0.7,
},
sheet: {
backgroundColor: colors.background.default,
borderTopLeftRadius: 20,
borderTopRightRadius: 20,
},
title: {
textAlign: 'center',
marginTop: 8,
marginBottom: 8,
},
notch: {
width: 48,
height: 5,
borderRadius: 4,
backgroundColor: colors.border.default,
marginTop: 8,
alignSelf: 'center',
},
searchContainer: {
marginLeft: 16,
marginRight: 16,
Expand Down
4 changes: 2 additions & 2 deletions app/components/Views/NetworkSelector/NetworkSelector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ describe('Network Selector', () => {
it('renders the linea mainnet cell correctly', () => {
(isNetworkUiRedesignEnabled as jest.Mock).mockImplementation(() => true);
const { getByText } = renderComponent(initialState);
const lineaRpcUrl = getByText('https://linea-rpc.publicnode.com');
const lineaRpcUrl = getByText('linea-rpc.publicnode.com');
const lineaCell = getByText('Linea');
expect(lineaCell).toBeTruthy();
expect(lineaRpcUrl).toBeTruthy();
Expand Down Expand Up @@ -572,7 +572,7 @@ describe('Network Selector', () => {
it('renders the mainnet cell correctly', () => {
(isNetworkUiRedesignEnabled as jest.Mock).mockImplementation(() => true);
const { getByText } = renderComponent(initialState);
const mainnetRpcUrl = getByText('https://mainnet-rpc.publicnode.com');
const mainnetRpcUrl = getByText('mainnet-rpc.publicnode.com');
const mainnetCell = getByText('Ethereum Mainnet');
expect(mainnetCell).toBeTruthy();
expect(mainnetRpcUrl).toBeTruthy();
Expand Down
Loading

0 comments on commit e335f05

Please sign in to comment.