Skip to content

Commit

Permalink
fix: adjust network names
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb committed Oct 29, 2024
1 parent e692641 commit 1a48ec2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/controller-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ export type BlockExplorerUrl =
(typeof BlockExplorerUrl)[keyof typeof BlockExplorerUrl];

export const NetworkNickname = {
[BuiltInNetworkName.Mainnet]: 'Mainnet',
[BuiltInNetworkName.Mainnet]: 'Ethereum Mainnet',
[BuiltInNetworkName.Goerli]: 'Goerli',
[BuiltInNetworkName.Sepolia]: 'Sepolia',
[BuiltInNetworkName.LineaGoerli]: 'Linea Goerli',
[BuiltInNetworkName.LineaSepolia]: 'Linea Sepolia',
[BuiltInNetworkName.LineaMainnet]: 'Linea Mainnet',
[BuiltInNetworkName.LineaMainnet]: 'Linea',
} as const satisfies Record<InfuraNetworkType, string>;
export type NetworkNickname =
(typeof NetworkNickname)[keyof typeof NetworkNickname];
Expand Down
8 changes: 4 additions & 4 deletions packages/network-controller/tests/NetworkController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0x1",
"defaultRpcEndpointIndex": 0,
"name": "Mainnet",
"name": "Ethereum Mainnet",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -428,7 +428,7 @@ describe('NetworkController', () => {
"blockExplorerUrls": Array [],
"chainId": "0xe708",
"defaultRpcEndpointIndex": 0,
"name": "Linea Mainnet",
"name": "Linea",
"nativeCurrency": "ETH",
"rpcEndpoints": Array [
Object {
Expand Down Expand Up @@ -3647,7 +3647,7 @@ describe('NetworkController', () => {
}),
).toThrow(
new Error(
"Could not add network with chain ID 0x1337 and Infura RPC endpoint for 'Mainnet' which represents 0x1, as the two conflict",
"Could not add network with chain ID 0x1337 and Infura RPC endpoint for 'Ethereum Mainnet' which represents 0x1, as the two conflict",
),
);
},
Expand Down Expand Up @@ -6531,7 +6531,7 @@ describe('NetworkController', () => {
],
}),
).rejects.toThrow(
"Could not update network to point to same RPC endpoint as existing network for chain 0x1 ('Mainnet')",
"Could not update network to point to same RPC endpoint as existing network for chain 0x1 ('Ethereum Mainnet')",
);
},
);
Expand Down

0 comments on commit 1a48ec2

Please sign in to comment.