Skip to content

Commit 8bb23bf

Browse files
chore: update sei fallback rpc and default visibility (#22450)
<!-- 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 change removes Sei from the default preloaded networks so that it no longer appears as a default entry in the networks list. Instead, it will now be displayed under Additional Networks, allowing users to manually add it if needed. Additionally, this update introduces a fallback RPC for Sei (QUICKNODE_SEI_URL) in customNetworks.tsx, ensuring improved redundancy and reliability when Infura is unavailable. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: removed Sei from default networks and added QuickNode fallback RPC. ## **Manual testing steps** ```gherkin Feature: Sei network configuration updates Scenario: Verify Sei is not listed as a default network Given the app is freshly installed or reset When I open the list of default networks Then I should NOT see "Sei" listed in the main network list And I should see "Sei" listed under the "Additional Networks" section Scenario: Verify Sei can be manually added Given I open the "Add Network" flow When I search for "Sei" Then I should be able to add the "Sei" network manually ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> <img width="391" height="799" alt="Screenshot 2025-11-10 at 21 19 16" src="https://github.com/user-attachments/assets/f9a2266d-b27f-453e-a0c1-c60ca0b2d15e" /> ## **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** - [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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Removes Sei from default networks and adds a QuickNode fallback RPC, including a migration to populate failoverUrls and associated test/snapshot updates. > > - **Networks**: > - Remove `sei-mainnet` from default `NetworkController` state so it appears under Additional Networks (`app/core/Engine/controllers/network-controller-init.ts`). > - Add QuickNode mapping for `sei-mainnet` and use it as `failoverRpcUrls` in `PopularList` (`app/util/networks/customNetworks.tsx`). > - **Migration**: > - Add `migration107` to append `failoverUrls` to SEI RPC endpoints when missing, guarded by `QUICKNODE_SEI_URL` (`app/store/migrations/107.ts`, wired in `app/store/migrations/index.ts`). > - Comprehensive tests for structure validation and behavior (`app/store/migrations/107.test.ts`). > - **Tests/Snapshots**: > - Update AddressSelector expectations/snapshot to exclude `Sei` from EVM list (`app/components/Views/AddressSelector/*`). > - Extend QuickNode env support to include `QUICKNODE_SEI_URL` in utils tests (`app/core/Engine/controllers/network-controller/utils.test.ts`). > - Update logs and initial background state fixtures to remove default SEI config (`app/util/logs/__snapshots__/index.test.ts.snap`, `app/util/test/initial-background-state.json`). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 27c61df. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Stanley Yuen <102275989+stanleyyconsensys@users.noreply.github.com>
1 parent c6baef5 commit 8bb23bf

File tree

10 files changed

+606
-238
lines changed

10 files changed

+606
-238
lines changed

app/components/Views/AddressSelector/AddressSelector.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
MAINNET_DISPLAY_NAME,
2020
OPTIMISM_DISPLAY_NAME,
2121
POLYGON_DISPLAY_NAME,
22-
SEI_DISPLAY_NAME,
2322
} from '../../../core/Engine/constants';
2423

2524
jest.mock('../../../core/Engine', () => ({
@@ -138,7 +137,6 @@ describe('AccountSelector', () => {
138137
expect(networkNames).toEqual([
139138
MAINNET_DISPLAY_NAME,
140139
BNB_DISPLAY_NAME,
141-
SEI_DISPLAY_NAME,
142140
POLYGON_DISPLAY_NAME,
143141
OPTIMISM_DISPLAY_NAME,
144142
ARBITRUM_DISPLAY_NAME,

app/components/Views/AddressSelector/__snapshots__/AddressSelector.test.tsx.snap

Lines changed: 5 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,187 +1075,6 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
10751075
"flexDirection": "row",
10761076
}
10771077
}
1078-
>
1079-
<View
1080-
style={
1081-
[
1082-
{
1083-
"alignItems": "center",
1084-
"backgroundColor": "#ffffff",
1085-
"display": "flex",
1086-
"flexDirection": "row",
1087-
"gap": 16,
1088-
"justifyContent": "space-between",
1089-
"paddingBottom": 0,
1090-
"paddingLeft": 0,
1091-
"paddingRight": 0,
1092-
"paddingTop": 0,
1093-
},
1094-
undefined,
1095-
]
1096-
}
1097-
testID="multichain-address-row"
1098-
>
1099-
<View
1100-
collapsable={false}
1101-
pointerEvents="none"
1102-
style={
1103-
{
1104-
"backgroundColor": "#457a391a",
1105-
"bottom": 0,
1106-
"left": 0,
1107-
"opacity": 0,
1108-
"position": "absolute",
1109-
"right": 0,
1110-
"top": 0,
1111-
}
1112-
}
1113-
/>
1114-
<View
1115-
style={
1116-
{
1117-
"alignItems": "center",
1118-
"backgroundColor": "#ffffff",
1119-
"borderRadius": 8,
1120-
"height": 32,
1121-
"justifyContent": "center",
1122-
"overflow": "hidden",
1123-
"width": 32,
1124-
}
1125-
}
1126-
testID="multichain-address-row-network-icon"
1127-
>
1128-
<Image
1129-
onError={[Function]}
1130-
resizeMode="contain"
1131-
source={1}
1132-
style={
1133-
{
1134-
"height": 32,
1135-
"width": 32,
1136-
}
1137-
}
1138-
testID="network-avatar-image"
1139-
/>
1140-
</View>
1141-
<View
1142-
style={
1143-
[
1144-
{
1145-
"alignItems": "flex-start",
1146-
"display": "flex",
1147-
"flexBasis": "0%",
1148-
"flexDirection": "column",
1149-
"flexGrow": 1,
1150-
"flexShrink": 1,
1151-
},
1152-
undefined,
1153-
]
1154-
}
1155-
>
1156-
<Text
1157-
accessibilityRole="text"
1158-
style={
1159-
[
1160-
{
1161-
"color": "#121314",
1162-
"fontFamily": "Geist Medium",
1163-
"fontSize": 16,
1164-
"fontWeight": 400,
1165-
"letterSpacing": 0,
1166-
"lineHeight": 24,
1167-
},
1168-
undefined,
1169-
]
1170-
}
1171-
testID="multichain-address-row-network-name"
1172-
>
1173-
Sei
1174-
</Text>
1175-
<Text
1176-
accessibilityRole="text"
1177-
style={
1178-
[
1179-
{
1180-
"color": "#686e7d",
1181-
"fontFamily": "Geist Medium",
1182-
"fontSize": 14,
1183-
"fontWeight": 400,
1184-
"letterSpacing": 0,
1185-
"lineHeight": 22,
1186-
},
1187-
undefined,
1188-
]
1189-
}
1190-
testID="multichain-address-row-address"
1191-
>
1192-
0x4FeC2...fdcB5
1193-
</Text>
1194-
</View>
1195-
<View
1196-
style={
1197-
[
1198-
{
1199-
"alignItems": "center",
1200-
"display": "flex",
1201-
"flexDirection": "row",
1202-
"gap": 16,
1203-
},
1204-
undefined,
1205-
]
1206-
}
1207-
/>
1208-
</View>
1209-
</View>
1210-
</View>
1211-
</TouchableOpacity>
1212-
</View>
1213-
<View
1214-
index={3}
1215-
onLayout={[Function]}
1216-
style={
1217-
{
1218-
"flexDirection": "column",
1219-
"height": undefined,
1220-
"left": 0,
1221-
"maxHeight": undefined,
1222-
"maxWidth": undefined,
1223-
"minHeight": undefined,
1224-
"minWidth": undefined,
1225-
"position": "absolute",
1226-
"top": 0,
1227-
"width": 0,
1228-
}
1229-
}
1230-
>
1231-
<TouchableOpacity
1232-
disabled={false}
1233-
onPress={[Function]}
1234-
style={
1235-
{
1236-
"backgroundColor": "#ffffff",
1237-
"borderRadius": 4,
1238-
"opacity": 1,
1239-
"position": "relative",
1240-
}
1241-
}
1242-
>
1243-
<View
1244-
accessibilityRole="none"
1245-
accessible={true}
1246-
style={
1247-
{
1248-
"padding": 16,
1249-
}
1250-
}
1251-
>
1252-
<View
1253-
style={
1254-
{
1255-
"alignItems": "center",
1256-
"flexDirection": "row",
1257-
}
1258-
}
12591078
>
12601079
<View
12611080
style={
@@ -1392,7 +1211,7 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
13921211
</TouchableOpacity>
13931212
</View>
13941213
<View
1395-
index={4}
1214+
index={3}
13961215
onLayout={[Function]}
13971216
style={
13981217
{
@@ -1573,7 +1392,7 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
15731392
</TouchableOpacity>
15741393
</View>
15751394
<View
1576-
index={5}
1395+
index={4}
15771396
onLayout={[Function]}
15781397
style={
15791398
{
@@ -1754,7 +1573,7 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
17541573
</TouchableOpacity>
17551574
</View>
17561575
<View
1757-
index={6}
1576+
index={5}
17581577
onLayout={[Function]}
17591578
style={
17601579
{
@@ -1935,7 +1754,7 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
19351754
</TouchableOpacity>
19361755
</View>
19371756
<View
1938-
index={7}
1757+
index={6}
19391758
onLayout={[Function]}
19401759
style={
19411760
{
@@ -2116,7 +1935,7 @@ exports[`AccountSelector renders correctly and matches snapshot 1`] = `
21161935
</TouchableOpacity>
21171936
</View>
21181937
<View
2119-
index={8}
1938+
index={7}
21201939
onLayout={[Function]}
21211940
style={
21221941
{

app/core/Engine/controllers/network-controller-init.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ export function getInitialNetworkControllerState(persistedState: {
9090
initialNetworkControllerState.networkConfigurationsByChainId[
9191
ChainId['polygon-mainnet']
9292
].name = 'Polygon';
93-
initialNetworkControllerState.networkConfigurationsByChainId[
93+
94+
// Remove Sei from initial state so it appears in Additional Networks section
95+
// Users can add it manually, and it will be available in FEATURED_RPCS
96+
delete initialNetworkControllerState.networkConfigurationsByChainId[
9497
ChainId['sei-mainnet']
95-
].name = 'Sei';
98+
];
9699
}
97100

98101
return initialNetworkControllerState;

app/core/Engine/controllers/network-controller/utils.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ function setQuicknodeEnvironmentVariables() {
388388
process.env.QUICKNODE_POLYGON_URL = 'https://example.quicknode.com/polygon';
389389
process.env.QUICKNODE_BASE_URL = 'https://example.quicknode.com/base';
390390
process.env.QUICKNODE_BSC_URL = 'https://example.quicknode.com/bsc';
391+
process.env.QUICKNODE_SEI_URL = 'https://example.quicknode.com/sei';
391392
}
392393

393394
/**

0 commit comments

Comments
 (0)