1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

UX: Multichain: Don't filter out custom mainnet RPCs (#19150)

This commit is contained in:
David Walsh 2023-05-17 12:26:15 -05:00 committed by GitHub
parent 556d3d82cc
commit 577e4cba0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,8 @@
"networkConfigurations": {
"testNetworkConfigurationId": {
"rpcUrl": "https://testrpc.com",
"chainId": "0x1"
"chainId": "0x1",
"nickname": "Custom Mainnet RPC"
}
},
"keyrings": [

View File

@ -76,7 +76,7 @@ export const NetworkListMenu = ({ onClose }) => {
>
<>
<Box className="multichain-network-list-menu" ref={networkListRef}>
{networks.map((network) => {
{networks.map((network, index) => {
const isCurrentNetwork = currentChainId === network.chainId;
const canDeleteNetwork =
!isCurrentNetwork &&
@ -86,7 +86,7 @@ export const NetworkListMenu = ({ onClose }) => {
<NetworkListItem
name={network.nickname}
iconSrc={network?.rpcPrefs?.imageUrl}
key={network.id || network.chainId}
key={`${network.id || network.chainId}-${index}`}
selected={isCurrentNetwork}
onClick={async () => {
dispatch(toggleNetworkMenu());

View File

@ -1189,7 +1189,6 @@ export function getAllNetworks(state) {
({ chainId }) =>
![
CHAIN_IDS.LOCALHOST,
CHAIN_IDS.MAINNET,
// Linea gets added as a custom network configuration so
// we must ignore it here to display in test networks
CHAIN_IDS.LINEA_TESTNET,