mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
UX: Cleanup of NetworkListMenu properties (#20304)
This commit is contained in:
parent
24ca518315
commit
7ca418de1f
@ -105,7 +105,7 @@ export const NetworkListMenu = ({ onClose }) => {
|
||||
}
|
||||
|
||||
const generateMenuItems = (desiredNetworks) => {
|
||||
return desiredNetworks.map((network, index) => {
|
||||
return desiredNetworks.map((network) => {
|
||||
if (!lineaMainnetReleased && network.providerType === 'linea-mainnet') {
|
||||
return null;
|
||||
}
|
||||
@ -117,7 +117,7 @@ export const NetworkListMenu = ({ onClose }) => {
|
||||
<NetworkListItem
|
||||
name={network.nickname}
|
||||
iconSrc={network?.rpcPrefs?.imageUrl}
|
||||
key={`${network.id || network.chainId}-${index}`}
|
||||
key={network.id}
|
||||
selected={isCurrentNetwork}
|
||||
focus={isCurrentNetwork && !showSearch}
|
||||
onClick={() => {
|
||||
@ -134,7 +134,7 @@ export const NetworkListMenu = ({ onClose }) => {
|
||||
location: 'Network Menu',
|
||||
chain_id: currentChainId,
|
||||
from_network: currentChainId,
|
||||
to_network: network.id || network.chainId,
|
||||
to_network: network.chainId,
|
||||
},
|
||||
});
|
||||
}}
|
||||
@ -145,7 +145,7 @@ export const NetworkListMenu = ({ onClose }) => {
|
||||
dispatch(
|
||||
showModal({
|
||||
name: 'CONFIRM_DELETE_NETWORK',
|
||||
target: network.id || network.chainId,
|
||||
target: network.id,
|
||||
onConfirm: () => undefined,
|
||||
}),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user