From 5a8043de144857573bbcf1a82ef71a9e6ade220c Mon Sep 17 00:00:00 2001 From: Agustinus Theodorus Date: Wed, 25 Sep 2024 00:43:42 +0700 Subject: [PATCH] feat: add new myriad paseo logo --- .../ExclusiveContentCreate/CurrencyOption.tsx | 1 + src/components/Login/render/Options/Options.tsx | 2 ++ .../ProfileCard/NetworkOption/NetworkOption.tsx | 2 ++ src/components/ProfileCard/ProfileContent.tsx | 2 ++ src/components/Tip/Tip.tsx | 6 ++++++ src/components/atoms/Icons/Core.tsx | 10 ++++++++++ src/helpers/extension.ts | 4 ++++ src/helpers/wallet.ts | 1 + src/images/Icons/myriad-paseo.svg | 1 + src/interfaces/network.ts | 1 + src/reducers/config/actions.ts | 1 + 11 files changed, 31 insertions(+) create mode 100644 src/images/Icons/myriad-paseo.svg diff --git a/src/components/ExclusiveContentCreate/CurrencyOption.tsx b/src/components/ExclusiveContentCreate/CurrencyOption.tsx index 9e1a2edf8..dd2dbbd21 100644 --- a/src/components/ExclusiveContentCreate/CurrencyOption.tsx +++ b/src/components/ExclusiveContentCreate/CurrencyOption.tsx @@ -47,6 +47,7 @@ export const CurrencyOption: React.FC = ({ if ( balance.networkId === 'myriad' || balance.networkId === 'debio' || + balance.networkId === 'paseo' || balance.networkId === 'rococo' ) return balance; diff --git a/src/components/Login/render/Options/Options.tsx b/src/components/Login/render/Options/Options.tsx index 56f61616f..8a7e11b8b 100644 --- a/src/components/Login/render/Options/Options.tsx +++ b/src/components/Login/render/Options/Options.tsx @@ -17,6 +17,7 @@ import { MetamaskWalletDisabledIcon, MyNearWalletIcon, MyriadOctopusIcon, + MyriadPaseoIcon, MyriadRococoIcon, NearNetworkIcon, PolkadotNetworkIcon, @@ -95,6 +96,7 @@ export const Options: React.FC = props => { kusama: , near: , myriad: , + paseo: , rococo: , debio: , }), diff --git a/src/components/ProfileCard/NetworkOption/NetworkOption.tsx b/src/components/ProfileCard/NetworkOption/NetworkOption.tsx index 3a4343408..021925869 100644 --- a/src/components/ProfileCard/NetworkOption/NetworkOption.tsx +++ b/src/components/ProfileCard/NetworkOption/NetworkOption.tsx @@ -16,6 +16,7 @@ import useBlockchain from 'components/common/Blockchain/use-blockchain.hook'; import { NearNetworkIcon24, MyriadOctopusIcon, + MyriadPaseoIcon, MyriadRococoIcon, PolkadotNetworkIcon, KusamaNetworkIcon, @@ -50,6 +51,7 @@ export const NetworkOption: React.FC = ({ kusama: , near: , myriad: , + paseo: , rococo: , debio: , }), diff --git a/src/components/ProfileCard/ProfileContent.tsx b/src/components/ProfileCard/ProfileContent.tsx index 1852cc532..0952f3f0b 100644 --- a/src/components/ProfileCard/ProfileContent.tsx +++ b/src/components/ProfileCard/ProfileContent.tsx @@ -16,6 +16,7 @@ import ShowIf from 'components/common/show-if.component'; import { NearNetworkIcon24, MyriadOctopusIcon, + MyriadPaseoIcon, MyriadRococoIcon, PolkadotNetworkIcon, KusamaNetworkIcon, @@ -53,6 +54,7 @@ export const ProfileContent: React.FC = props => { kusama: , near: , myriad: , + paseo: , rococo: , debio: , }), diff --git a/src/components/Tip/Tip.tsx b/src/components/Tip/Tip.tsx index 6825974e8..ed8a48419 100644 --- a/src/components/Tip/Tip.tsx +++ b/src/components/Tip/Tip.tsx @@ -20,6 +20,7 @@ import { PolkadotNetworkIcon, KusamaNetworkIcon, DebioNetworkIcon, + MyriadPaseoIcon, MyriadRococoIcon, } from 'src/components/atoms/Icons'; import ShowIf from 'src/components/common/show-if.component'; @@ -57,6 +58,10 @@ const networkOptions: MenuOptions[] = [ id: 'near', title: 'NEAR', }, + { + id: 'paseo', + title: 'Myriad Paseo', + }, { id: 'rococo', title: 'Myriad Rococo', @@ -93,6 +98,7 @@ export const Tip: React.FC = props => { kusama: , near: , myriad: , + paseo: , rococo: , debio: , }), diff --git a/src/components/atoms/Icons/Core.tsx b/src/components/atoms/Icons/Core.tsx index f567e9a97..179cae6b6 100644 --- a/src/components/atoms/Icons/Core.tsx +++ b/src/components/atoms/Icons/Core.tsx @@ -13,6 +13,7 @@ import MyriadFullBlack from 'src/images/Icons/myriad-full-black.svg'; import MyriadGrey from 'src/images/Icons/myriad-grey.svg'; import MyriadFull from 'src/images/Icons/myriad-logo-full.svg'; import MyriadOctopus from 'src/images/Icons/myriad-octopus.svg'; +import MyriadPaseo from 'src/images/Icons/myriad-paseo.svg'; import MyriadRococo from 'src/images/Icons/myriad-rococo.svg'; import Notification from 'src/images/Icons/notif-default.svg'; import OfficialBadge from 'src/images/Icons/official-badge.svg'; @@ -37,6 +38,15 @@ export const MyriadOctopusIcon: React.FC = props => ( /> ); +export const MyriadPaseoIcon: React.FC = props => ( + +); + export const MyriadRococoIcon: React.FC = props => ( { if (isHex(address)) { switch (currentWallet.networkId) { + case NetworkIdEnum.MYRIADPASEO: { + return encodeAddress(hexToU8a(address), 42); + } + case NetworkIdEnum.MYRIADROCOCO: { return encodeAddress(hexToU8a(address), 42); } diff --git a/src/helpers/wallet.ts b/src/helpers/wallet.ts index c33ccf418..7606f0a51 100644 --- a/src/helpers/wallet.ts +++ b/src/helpers/wallet.ts @@ -60,6 +60,7 @@ export const formatWalletTitle = ( if (networkId) { switch (networkId) { + case NetworkIdEnum.MYRIADPASEO: case NetworkIdEnum.MYRIADROCOCO: case NetworkIdEnum.MYRIADOCTOPUS: case NetworkIdEnum.DEBIO: diff --git a/src/images/Icons/myriad-paseo.svg b/src/images/Icons/myriad-paseo.svg new file mode 100644 index 000000000..345a7a001 --- /dev/null +++ b/src/images/Icons/myriad-paseo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/interfaces/network.ts b/src/interfaces/network.ts index f434639ae..d781aaf6c 100644 --- a/src/interfaces/network.ts +++ b/src/interfaces/network.ts @@ -11,6 +11,7 @@ export enum NetworkIdEnum { POLYGON = 'polygon', NEAR = 'near', MYRIADOCTOPUS = 'myriad', + MYRIADPASEO = 'paseo', MYRIADROCOCO = 'rococo', KUSAMA = 'kusama', DEBIO = 'debio', diff --git a/src/reducers/config/actions.ts b/src/reducers/config/actions.ts index 9d6ce2d5f..f33d62e87 100644 --- a/src/reducers/config/actions.ts +++ b/src/reducers/config/actions.ts @@ -189,6 +189,7 @@ export const fetchFilteredToken: ThunkActionCreator = or: [ { networkId: 'myriad' }, { networkId: 'debio' }, + { networkId: 'paseo' }, { networkId: 'rococo' }, ], },