Skip to content

Commit 28ca838

Browse files
committed
Merge branch 'salim/bump-network-controller-21.0.0-migration' into salim/default-rpc-feature
1 parent 6dd04e0 commit 28ca838

File tree

22 files changed

+708
-205
lines changed

22 files changed

+708
-205
lines changed

app/component-library/components-temp/ListItemMultiSelectButton/ListItemMultiSelectButton.constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ListItemMultiSelectButtonProps } from './ListItemMultiSelectButton.type
88
// Defaults
99
export const DEFAULT_LISTITEMMULTISELECT_GAP = 16;
1010
export const BUTTON_TEST_ID = 'button-menu-select-test-id';
11+
export const BUTTON_TEXT_TEST_ID = 'button-text-select-test-id';
1112

1213
// Sample consts
1314
export const SAMPLE_LISTITEMMULTISELECT_PROPS: ListItemMultiSelectButtonProps =

app/components/Nav/App/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,6 @@ const App = (props) => {
711711
component={MultiRpcModal}
712712
/>
713713
) : null}
714-
715714
<Stack.Screen
716715
name={Routes.MODAL.MULTI_RPC_MIGRATION_MODAL}
717716
component={MultiRpcModal}

app/components/Nav/Main/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ const Main = (props) => {
294294
networkImageSource: networkImage,
295295
});
296296
}
297-
298297
previousNetworkConfigurations.current = networkConfigurations;
299298
}, [networkConfigurations, networkName, networkImage, toastRef]);
300299

app/components/UI/NetworkModal/NetworkAdded/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ const createStyles = (colors: any) =>
1414
flexDirection: 'row',
1515
paddingVertical: 16,
1616
},
17+
base: {
18+
padding: 16,
19+
},
1720
button: {
1821
flex: 1,
1922
},
@@ -41,7 +44,7 @@ const NetworkAdded = (props: NetworkAddedProps) => {
4144
const styles = createStyles(colors);
4245

4346
return (
44-
<View>
47+
<View style={styles.base}>
4548
<Text centered bold black big>
4649
{strings('networks.new_network')}
4750
</Text>

app/components/UI/Ramp/Views/NetworkSwitcher/__snapshots__/NetworkSwitcher.test.tsx.snap

Lines changed: 24 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
549549
{
550550
"borderRadius": 10,
551551
"height": 20,
552-
"marginRight": 10,
552+
"marginRight": 20,
553553
"width": 20,
554554
}
555555
}
@@ -703,7 +703,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
703703
{
704704
"borderRadius": 10,
705705
"height": 20,
706-
"marginRight": 10,
706+
"marginRight": 20,
707707
"width": 20,
708708
}
709709
}
@@ -1444,7 +1444,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
14441444
{
14451445
"borderRadius": 10,
14461446
"height": 20,
1447-
"marginRight": 10,
1447+
"marginRight": 20,
14481448
"width": 20,
14491449
}
14501450
}
@@ -1492,10 +1492,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
14921492
},
14931493
undefined,
14941494
undefined,
1495-
{
1496-
"fontFamily": "EuclidCircularB-Bold",
1497-
"fontWeight": "600",
1498-
},
1495+
false,
14991496
undefined,
15001497
undefined,
15011498
undefined,
@@ -1598,7 +1595,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
15981595
{
15991596
"borderRadius": 10,
16001597
"height": 20,
1601-
"marginRight": 10,
1598+
"marginRight": 20,
16021599
"width": 20,
16031600
}
16041601
}
@@ -1648,10 +1645,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
16481645
},
16491646
undefined,
16501647
undefined,
1651-
{
1652-
"fontFamily": "EuclidCircularB-Bold",
1653-
"fontWeight": "600",
1654-
},
1648+
false,
16551649
undefined,
16561650
undefined,
16571651
undefined,
@@ -2297,7 +2291,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
22972291
{
22982292
"borderRadius": 10,
22992293
"height": 20,
2300-
"marginRight": 10,
2294+
"marginRight": 20,
23012295
"width": 20,
23022296
}
23032297
}
@@ -2451,7 +2445,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
24512445
{
24522446
"borderRadius": 10,
24532447
"height": 20,
2454-
"marginRight": 10,
2448+
"marginRight": 20,
24552449
"width": 20,
24562450
}
24572451
}
@@ -2605,7 +2599,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
26052599
{
26062600
"borderRadius": 10,
26072601
"height": 20,
2608-
"marginRight": 10,
2602+
"marginRight": 20,
26092603
"width": 20,
26102604
}
26112605
}
@@ -2653,10 +2647,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
26532647
},
26542648
undefined,
26552649
undefined,
2656-
{
2657-
"fontFamily": "EuclidCircularB-Bold",
2658-
"fontWeight": "600",
2659-
},
2650+
false,
26602651
undefined,
26612652
undefined,
26622653
undefined,
@@ -2759,7 +2750,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
27592750
{
27602751
"borderRadius": 10,
27612752
"height": 20,
2762-
"marginRight": 10,
2753+
"marginRight": 20,
27632754
"width": 20,
27642755
}
27652756
}
@@ -2809,10 +2800,7 @@ exports[`NetworkSwitcher View renders and dismisses network modal when pressing
28092800
},
28102801
undefined,
28112802
undefined,
2812-
{
2813-
"fontFamily": "EuclidCircularB-Bold",
2814-
"fontWeight": "600",
2815-
},
2803+
false,
28162804
undefined,
28172805
undefined,
28182806
undefined,
@@ -3458,7 +3446,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
34583446
{
34593447
"borderRadius": 10,
34603448
"height": 20,
3461-
"marginRight": 10,
3449+
"marginRight": 20,
34623450
"width": 20,
34633451
}
34643452
}
@@ -3612,7 +3600,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
36123600
{
36133601
"borderRadius": 10,
36143602
"height": 20,
3615-
"marginRight": 10,
3603+
"marginRight": 20,
36163604
"width": 20,
36173605
}
36183606
}
@@ -3766,7 +3754,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
37663754
{
37673755
"borderRadius": 10,
37683756
"height": 20,
3769-
"marginRight": 10,
3757+
"marginRight": 20,
37703758
"width": 20,
37713759
}
37723760
}
@@ -3814,10 +3802,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
38143802
},
38153803
undefined,
38163804
undefined,
3817-
{
3818-
"fontFamily": "EuclidCircularB-Bold",
3819-
"fontWeight": "600",
3820-
},
3805+
false,
38213806
undefined,
38223807
undefined,
38233808
undefined,
@@ -3920,7 +3905,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
39203905
{
39213906
"borderRadius": 10,
39223907
"height": 20,
3923-
"marginRight": 10,
3908+
"marginRight": 20,
39243909
"width": 20,
39253910
}
39263911
}
@@ -3970,10 +3955,7 @@ exports[`NetworkSwitcher View renders correctly 1`] = `
39703955
},
39713956
undefined,
39723957
undefined,
3973-
{
3974-
"fontFamily": "EuclidCircularB-Bold",
3975-
"fontWeight": "600",
3976-
},
3958+
false,
39773959
undefined,
39783960
undefined,
39793961
undefined,
@@ -4619,7 +4601,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
46194601
{
46204602
"borderRadius": 10,
46214603
"height": 20,
4622-
"marginRight": 10,
4604+
"marginRight": 20,
46234605
"width": 20,
46244606
}
46254607
}
@@ -4773,7 +4755,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
47734755
{
47744756
"borderRadius": 10,
47754757
"height": 20,
4776-
"marginRight": 10,
4758+
"marginRight": 20,
47774759
"width": 20,
47784760
}
47794761
}
@@ -4927,7 +4909,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
49274909
{
49284910
"borderRadius": 10,
49294911
"height": 20,
4930-
"marginRight": 10,
4912+
"marginRight": 20,
49314913
"width": 20,
49324914
}
49334915
}
@@ -4975,10 +4957,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
49754957
},
49764958
undefined,
49774959
undefined,
4978-
{
4979-
"fontFamily": "EuclidCircularB-Bold",
4980-
"fontWeight": "600",
4981-
},
4960+
false,
49824961
undefined,
49834962
undefined,
49844963
undefined,
@@ -5081,7 +5060,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
50815060
{
50825061
"borderRadius": 10,
50835062
"height": 20,
5084-
"marginRight": 10,
5063+
"marginRight": 20,
50855064
"width": 20,
50865065
}
50875066
}
@@ -5131,10 +5110,7 @@ exports[`NetworkSwitcher View renders correctly 2`] = `
51315110
},
51325111
undefined,
51335112
undefined,
5134-
{
5135-
"fontFamily": "EuclidCircularB-Bold",
5136-
"fontWeight": "600",
5137-
},
5113+
false,
51385114
undefined,
51395115
undefined,
51405116
undefined,

app/components/Views/NetworkSelector/NetworkSelector.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,17 @@ const NetworkSelector = () => {
451451
networkName: mainnetName,
452452
})
453453
}
454+
onLongPress={() => {
455+
openModal(chainId, false, MAINNET, true);
456+
}}
454457
/>
455458
);
456459
}
457460

458461
return (
459462
<Cell
460463
variant={CellVariant.Select}
461-
title={mainnetName}
464+
title={name}
462465
avatarProps={{
463466
variant: AvatarVariant.Network,
464467
name: mainnetName,
@@ -474,6 +477,7 @@ const NetworkSelector = () => {
474477

475478
const renderLineaMainnet = () => {
476479
const { name: lineaMainnetName, chainId } = Networks['linea-mainnet'];
480+
const name = networkConfigurations?.[chainId]?.name ?? lineaMainnetName;
477481

478482
if (isNetworkUiRedesignEnabled() && isNoSearchResults('linea-mainnet'))
479483
return null;
@@ -483,7 +487,7 @@ const NetworkSelector = () => {
483487
<Cell
484488
key={chainId}
485489
variant={CellVariant.SelectWithMenu}
486-
title={lineaMainnetName}
490+
title={name}
487491
avatarProps={{
488492
variant: AvatarVariant.Network,
489493
name: lineaMainnetName,
@@ -506,14 +510,17 @@ const NetworkSelector = () => {
506510
networkName: lineaMainnetName,
507511
})
508512
}
513+
onLongPress={() => {
514+
openModal(chainId, false, LINEA_MAINNET, true);
515+
}}
509516
/>
510517
);
511518
}
512519

513520
return (
514521
<Cell
515522
variant={CellVariant.Select}
516-
title={lineaMainnetName}
523+
title={name}
517524
avatarProps={{
518525
variant: AvatarVariant.Network,
519526
name: lineaMainnetName,
@@ -989,11 +996,7 @@ const NetworkSelector = () => {
989996
>
990997
<View style={styles.networkMenu}>
991998
<AccountAction
992-
actionTitle={strings(
993-
showNetworkMenuModal.isReadOnly
994-
? 'networks.view_details'
995-
: 'transaction.edit',
996-
)}
999+
actionTitle={strings('transaction.edit')}
9971000
iconName={IconName.Edit}
9981001
onPress={() => {
9991002
sheetRef.current?.onCloseBottomSheet(() => {
@@ -1011,6 +1014,7 @@ const NetworkSelector = () => {
10111014
actionTitle={strings('app_settings.delete')}
10121015
iconName={IconName.Trash}
10131016
onPress={() => removeRpcUrl(showNetworkMenuModal.chainId)}
1017+
testID={`delete-network-button-${showNetworkMenuModal.chainId}`}
10141018
/>
10151019
) : null}
10161020
</View>

0 commit comments

Comments
 (0)