Skip to content
4 changes: 4 additions & 0 deletions packages/controller-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Change network nicknames ([#7045](https://github.com/MetaMask/core/pull/7045))

## [11.15.0]

### Added
Expand Down
14 changes: 7 additions & 7 deletions packages/controller-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,20 @@ export type BlockExplorerUrl =
(typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];

export const NetworkNickname = {
[BuiltInNetworkName.Mainnet]: 'Ethereum Mainnet',
[BuiltInNetworkName.Mainnet]: 'Ethereum',
[BuiltInNetworkName.Goerli]: 'Goerli',
[BuiltInNetworkName.Sepolia]: 'Sepolia',
[BuiltInNetworkName.LineaGoerli]: 'Linea Goerli',
[BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia',
[BuiltInNetworkName.LineaMainnet]: 'Linea',
[BuiltInNetworkName.MegaETHTestnet]: 'Mega Testnet',
[BuiltInNetworkName.MonadTestnet]: 'Monad Testnet',
[BuiltInNetworkName.BaseMainnet]: 'Base Mainnet',
[BuiltInNetworkName.ArbitrumOne]: 'Arbitrum One',
[BuiltInNetworkName.BscMainnet]: 'BSC Mainnet',
[BuiltInNetworkName.OptimismMainnet]: 'Optimism Mainnet',
[BuiltInNetworkName.PolygonMainnet]: 'Polygon Mainnet',
[BuiltInNetworkName.SeiMainnet]: 'Sei Mainnet',
[BuiltInNetworkName.BaseMainnet]: 'Base',
[BuiltInNetworkName.ArbitrumOne]: 'Arbitrum',
[BuiltInNetworkName.BscMainnet]: 'BNB Chain',
[BuiltInNetworkName.OptimismMainnet]: 'OP',
[BuiltInNetworkName.PolygonMainnet]: 'Polygon',
[BuiltInNetworkName.SeiMainnet]: 'Sei',
} as const satisfies Record<BuiltInNetworkType, string>;
export type NetworkNickname =
(typeof NetworkNickname)[keyof typeof NetworkNickname];
Expand Down
74 changes: 37 additions & 37 deletions packages/network-controller/tests/NetworkController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Ethereum Mainnet",
"name": "Ethereum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -500,7 +500,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x2105",
"defaultRpcEndpointIndex": 0,
"name": "Base Mainnet",
"name": "Base",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -515,7 +515,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x38",
"defaultRpcEndpointIndex": 0,
"name": "BSC Mainnet",
"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": Array [
Object {
Expand All @@ -530,7 +530,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x531",
"defaultRpcEndpointIndex": 0,
"name": "Sei Mainnet",
"name": "Sei",
"nativeCurrency": "SEI",
"rpcEndpoints": Array [
Object {
Expand All @@ -545,7 +545,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x89",
"defaultRpcEndpointIndex": 0,
"name": "Polygon Mainnet",
"name": "Polygon",
"nativeCurrency": "POL",
"rpcEndpoints": Array [
Object {
Expand All @@ -560,7 +560,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa",
"defaultRpcEndpointIndex": 0,
"name": "Optimism Mainnet",
"name": "OP",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -575,7 +575,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa4b1",
"defaultRpcEndpointIndex": 0,
"name": "Arbitrum One",
"name": "Arbitrum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -654,7 +654,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Ethereum Mainnet",
"name": "Ethereum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -687,7 +687,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x2105",
"defaultRpcEndpointIndex": 0,
"name": "Base Mainnet",
"name": "Base",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -702,7 +702,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x38",
"defaultRpcEndpointIndex": 0,
"name": "BSC Mainnet",
"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": Array [
Object {
Expand All @@ -717,7 +717,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x531",
"defaultRpcEndpointIndex": 0,
"name": "Sei Mainnet",
"name": "Sei",
"nativeCurrency": "SEI",
"rpcEndpoints": Array [
Object {
Expand All @@ -732,7 +732,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x89",
"defaultRpcEndpointIndex": 0,
"name": "Polygon Mainnet",
"name": "Polygon",
"nativeCurrency": "POL",
"rpcEndpoints": Array [
Object {
Expand All @@ -747,7 +747,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa",
"defaultRpcEndpointIndex": 0,
"name": "Optimism Mainnet",
"name": "OP",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -762,7 +762,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa4b1",
"defaultRpcEndpointIndex": 0,
"name": "Arbitrum One",
"name": "Arbitrum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -4967,7 +4967,7 @@ describe('NetworkController', () => {
}),
).toThrow(
new Error(
"Could not add network with chain ID 0x1337 and Infura RPC endpoint for 'Ethereum Mainnet' which represents 0x1, as the two conflict",
"Could not add network with chain ID 0x1337 and Infura RPC endpoint for 'Ethereum' which represents 0x1, as the two conflict",
),
);
},
Expand Down Expand Up @@ -8051,7 +8051,7 @@ describe('NetworkController', () => {
],
}),
).rejects.toThrow(
"Could not update network to point to same RPC endpoint as existing network for chain 0x1 ('Ethereum Mainnet')",
"Could not update network to point to same RPC endpoint as existing network for chain 0x1 ('Ethereum')",
);
},
);
Expand Down Expand Up @@ -14770,7 +14770,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Ethereum Mainnet",
"name": "Ethereum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -14785,7 +14785,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x2105",
"defaultRpcEndpointIndex": 0,
"name": "Base Mainnet",
"name": "Base",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -14800,7 +14800,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x38",
"defaultRpcEndpointIndex": 0,
"name": "BSC Mainnet",
"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": Array [
Object {
Expand All @@ -14815,7 +14815,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x531",
"defaultRpcEndpointIndex": 0,
"name": "Sei Mainnet",
"name": "Sei",
"nativeCurrency": "SEI",
"rpcEndpoints": Array [
Object {
Expand All @@ -14830,7 +14830,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x89",
"defaultRpcEndpointIndex": 0,
"name": "Polygon Mainnet",
"name": "Polygon",
"nativeCurrency": "POL",
"rpcEndpoints": Array [
Object {
Expand All @@ -14845,7 +14845,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa",
"defaultRpcEndpointIndex": 0,
"name": "Optimism Mainnet",
"name": "OP",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -14860,7 +14860,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa4b1",
"defaultRpcEndpointIndex": 0,
"name": "Arbitrum One",
"name": "Arbitrum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -14939,7 +14939,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Ethereum Mainnet",
"name": "Ethereum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -14954,7 +14954,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x2105",
"defaultRpcEndpointIndex": 0,
"name": "Base Mainnet",
"name": "Base",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -14969,7 +14969,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x38",
"defaultRpcEndpointIndex": 0,
"name": "BSC Mainnet",
"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": Array [
Object {
Expand All @@ -14984,7 +14984,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x531",
"defaultRpcEndpointIndex": 0,
"name": "Sei Mainnet",
"name": "Sei",
"nativeCurrency": "SEI",
"rpcEndpoints": Array [
Object {
Expand All @@ -14999,7 +14999,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x89",
"defaultRpcEndpointIndex": 0,
"name": "Polygon Mainnet",
"name": "Polygon",
"nativeCurrency": "POL",
"rpcEndpoints": Array [
Object {
Expand All @@ -15014,7 +15014,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa",
"defaultRpcEndpointIndex": 0,
"name": "Optimism Mainnet",
"name": "OP",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -15029,7 +15029,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa4b1",
"defaultRpcEndpointIndex": 0,
"name": "Arbitrum One",
"name": "Arbitrum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -15108,7 +15108,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Ethereum Mainnet",
"name": "Ethereum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -15123,7 +15123,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x2105",
"defaultRpcEndpointIndex": 0,
"name": "Base Mainnet",
"name": "Base",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -15138,7 +15138,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x38",
"defaultRpcEndpointIndex": 0,
"name": "BSC Mainnet",
"name": "BNB Chain",
"nativeCurrency": "BNB",
"rpcEndpoints": Array [
Object {
Expand All @@ -15153,7 +15153,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x531",
"defaultRpcEndpointIndex": 0,
"name": "Sei Mainnet",
"name": "Sei",
"nativeCurrency": "SEI",
"rpcEndpoints": Array [
Object {
Expand All @@ -15168,7 +15168,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x89",
"defaultRpcEndpointIndex": 0,
"name": "Polygon Mainnet",
"name": "Polygon",
"nativeCurrency": "POL",
"rpcEndpoints": Array [
Object {
Expand All @@ -15183,7 +15183,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa",
"defaultRpcEndpointIndex": 0,
"name": "Optimism Mainnet",
"name": "OP",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand All @@ -15198,7 +15198,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xa4b1",
"defaultRpcEndpointIndex": 0,
"name": "Arbitrum One",
"name": "Arbitrum",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down
Loading