Skip to content

Commit 5f241e0

Browse files
authored
feat: add kusama and paseo asset hub endpoints (#592)
1 parent c5a5fac commit 5f241e0

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/constants/index.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ export const LOCAL = {
2020
rpc: CUSTOM_ENDPOINT ? (JSON.parse(CUSTOM_ENDPOINT) as string) : 'ws://127.0.0.1:9944',
2121
};
2222

23+
export const ASSET_HUB_TESTNET = {
24+
relay: 'Paseo',
25+
name: 'Asset Hub',
26+
rpc: 'wss://asset-hub-paseo-rpc.n.dwellir.com',
27+
};
28+
29+
export const KUSAMA_ASSET_HUB = {
30+
relay: 'Kusama',
31+
name: 'Kusama Asset Hub',
32+
rpc: 'wss://kusama-asset-hub-rpc.polkadot.io',
33+
};
34+
2335
export const PASSET_HUB_TESTNET = {
2436
relay: 'Paseo',
2537
name: 'Passet Hub',
@@ -91,7 +103,9 @@ const ZEITGEIST_BATTERY_STATION = {
91103
};
92104

93105
export const TESTNETS_V6 = [
94-
...[PASSET_HUB_TESTNET, WESTEND_ASSET_HUB].sort((a, b) => a.name.localeCompare(b.name)),
106+
...[PASSET_HUB_TESTNET, ASSET_HUB_TESTNET, WESTEND_ASSET_HUB].sort((a, b) =>
107+
a.name.localeCompare(b.name),
108+
),
95109
LOCAL,
96110
];
97111

@@ -106,6 +120,8 @@ export const TESTNETS_V5 = [
106120
LOCAL,
107121
];
108122

123+
export const MAINNETS_V6 = [KUSAMA_ASSET_HUB].sort((a, b) => a.name.localeCompare(b.name));
124+
109125
export const MAINNETS_V5 = [ASTAR, SHIDEN, ALEPH_ZERO, KREIVO].sort((a, b) =>
110126
a.name.localeCompare(b.name),
111127
);

src/ui/layout/sidebar/NetworkAndUser.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { useNavigate } from 'react-router';
55

6-
import { TESTNETS_V5, TESTNETS_V6, MAINNETS_V5 } from '../../../constants';
6+
import { TESTNETS_V5, TESTNETS_V6, MAINNETS_V5, MAINNETS_V6 } from '../../../constants';
77
import { useApi, useVersion } from 'ui/contexts';
88
import { classes } from 'lib/util';
99
import { Dropdown } from 'ui/components';
@@ -15,7 +15,7 @@ export function NetworkAndUser() {
1515

1616
const testnets = version === 'v6' ? TESTNETS_V6 : TESTNETS_V5;
1717
const testnetOptions = testnets.map(network => ({ label: network.name, value: network.rpc }));
18-
const mainnets = version === 'v5' ? MAINNETS_V5 : [];
18+
const mainnets = version === 'v6' ? MAINNETS_V6 : MAINNETS_V5;
1919
const mainnetOptions = mainnets.map(network => ({ label: network.name, value: network.rpc }));
2020
const allOptions = [...testnetOptions, ...mainnetOptions];
2121

0 commit comments

Comments
 (0)