Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust network names #4865

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading