Skip to content

Commit

Permalink
Merge branch 'main' into feat/enable-stx-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
httpJunkie authored Feb 6, 2025
2 parents a54b04d + 1937f9a commit 5a41b9f
Show file tree
Hide file tree
Showing 31 changed files with 1,703 additions and 2,135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const SwitchChainApproval = () => {
onConfirm={onConfirm}
currentPageInformation={pageMeta}
customNetworkInformation={approvalRequest?.requestData}
type={approvalRequest?.requestData?.type}
/>
</ApprovalModal>
);
Expand Down
69 changes: 24 additions & 45 deletions app/components/UI/NetworkModal/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ exports[`NetworkDetails renders correctly 1`] = `
}
}
>
Add Network
Add Test Network
</Text>
</View>
<View
Expand Down Expand Up @@ -338,15 +338,15 @@ exports[`NetworkDetails renders correctly 1`] = `
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontFamily": "EuclidCircularB-Medium",
"fontSize": 14,
"fontWeight": "700",
"fontWeight": "500",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Display name
Currency symbol
</Text>
<Text
accessibilityRole="text"
Expand All @@ -362,54 +362,33 @@ exports[`NetworkDetails renders correctly 1`] = `
}
}
>
Test Network
TEST
</Text>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 14,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Chain ID
</Text>
<Text
accessibilityRole="text"
<View
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
"marginBottom": 8,
"alignItems": "center",
"flexDirection": "row",
"gap": 8,
}
}
>
1
</Text>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Bold",
"fontSize": 14,
"fontWeight": "700",
"letterSpacing": 0,
"lineHeight": 22,
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Medium",
"fontSize": 14,
"fontWeight": "500",
"letterSpacing": 0,
"lineHeight": 22,
}
}
}
>
Network URL
</Text>
>
Network RPC URL
</Text>
</View>
<Text
accessibilityRole="text"
style={
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import NetworkVerificationInfo from './NetworkVerificationInfo';
import { render } from '@testing-library/react-native';
import { render, fireEvent } from '@testing-library/react-native';
import { BannerAlertSeverity } from '../../../component-library/components/Banners/Banner';
import { strings } from '../../../../locales/i18n';
import { useSelector } from 'react-redux';
Expand Down Expand Up @@ -85,7 +85,7 @@ describe('NetworkVerificationInfo', () => {
).toThrow('Unable to find an element with text');
});

it('should render chainId on decimal', () => {
it('should render chainId as a decimal', () => {
(useSelector as jest.Mock).mockReturnValue(true);
const { getByText } = render(
<NetworkVerificationInfo
Expand All @@ -95,6 +95,12 @@ describe('NetworkVerificationInfo', () => {
/>,
);

// Accordion content is hidden by default, so we need to expand it
const accordionButton = getByText(
strings('spend_limit_edition.view_details'),
);
fireEvent.press(accordionButton);

expect(getByText('10')).toBeTruthy();
});

Expand Down
Loading

0 comments on commit 5a41b9f

Please sign in to comment.