Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Oct 4, 2024
1 parent e7c2af0 commit 2b2f82b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/assets/networks/coretime/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import KusamaCoretime from './kusama.png';
import PaseoCoretime from './paseo.png';
import PolkadotCoretime from './polkadot.png';
import RococoCoretime from './rococo.png';
import WestendCoretime from './westend.png';

export { KusamaCoretime, PolkadotCoretime, RococoCoretime, WestendCoretime };
export { KusamaCoretime, PaseoCoretime, PolkadotCoretime, RococoCoretime, WestendCoretime };
Binary file added src/assets/networks/coretime/paseo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/assets/networks/relay/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { NetworkType } from '@/models';

import Kusama from './kusama.png';
import Paseo from './paseo.png';
import Polkadot from './polkadot.png';
import Rococo from './rococo.png';
import Westend from './westend.png';
Expand All @@ -11,6 +12,8 @@ const getIcon = (network: NetworkType) => {
return Polkadot;
case NetworkType.KUSAMA:
return Kusama;
case NetworkType.PASEO:
return Paseo;
case NetworkType.ROCOCO:
return Rococo;
case NetworkType.WESTEND:
Expand All @@ -20,4 +23,4 @@ const getIcon = (network: NetworkType) => {
}
};

export { getIcon, Kusama, Polkadot, Rococo, Westend };
export { getIcon, Kusama, Paseo, Polkadot, Rococo, Westend };
Binary file added src/assets/networks/relay/paseo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/Elements/Selectors/ChainSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { enableRegionX } from '@/utils/functions';
import {
Kusama,
KusamaCoretime,
Paseo,
PaseoCoretime,
Polkadot,
PolkadotCoretime,
RegionX,
Expand All @@ -28,6 +30,7 @@ import { useNetwork } from '@/contexts/network';
const coretimeIcons = {
[NetworkType.POLKADOT]: PolkadotCoretime,
[NetworkType.KUSAMA]: KusamaCoretime,
[NetworkType.PASEO]: PaseoCoretime,
[NetworkType.ROCOCO]: RococoCoretime,
[NetworkType.WESTEND]: WestendCoretime,
[NetworkType.NONE]: '',
Expand All @@ -36,6 +39,7 @@ const coretimeIcons = {
const relayIcons = {
[NetworkType.POLKADOT]: Polkadot,
[NetworkType.KUSAMA]: Kusama,
[NetworkType.PASEO]: Paseo,
[NetworkType.ROCOCO]: Rococo,
[NetworkType.WESTEND]: Westend,
[NetworkType.NONE]: '',
Expand Down
13 changes: 9 additions & 4 deletions src/components/Elements/Selectors/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { useRouter } from 'next/router';

import {
Kusama as KusamaIcon,
Paseo as PaseoIcon,
Polkadot as PolkadotIcon,
Rococo as RococoIcon,
} from '@/assets/networks/relay';
import { useNetwork } from '@/contexts/network';
import { NetworkType } from '@/models';
Expand Down Expand Up @@ -37,11 +37,16 @@ export const NetworkSelector = () => {
icon: KusamaIcon,
},
{
value: NetworkType.ROCOCO,
label: 'Rococo',
icon: RococoIcon,
value: NetworkType.PASEO,
label: 'Paseo',
icon: PaseoIcon,
},
// {
// value: NetworkType.ROCOCO,
// label: 'Rococo',
// icon: RococoIcon,
// },
// {
// value: NetworkType.WESTEND,
// label: 'Westend',
// icon: WestendIcon,
Expand Down
1 change: 1 addition & 0 deletions src/contexts/network/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const NetworkProvider = ({ children }: Props) => {
if (!router.isReady) return;
if (network === 'polkadot') setActiveNetwork(NetworkType.POLKADOT);
else if (network === 'kusama') setActiveNetwork(NetworkType.KUSAMA);
else if (network === 'paseo') setActiveNetwork(NetworkType.PASEO);
else if (network === 'rococo') setActiveNetwork(NetworkType.ROCOCO);
else if (network === 'westend') setActiveNetwork(NetworkType.WESTEND);
else {
Expand Down

0 comments on commit 2b2f82b

Please sign in to comment.