From e7c43d481a0c47a0bd4326ebed6cae37c38ab4e9 Mon Sep 17 00:00:00 2001 From: soulBit Date: Thu, 16 Jun 2022 16:12:54 +0100 Subject: [PATCH] fix: broken menu URLs (#2266) --- .../DefaultHeaderComponent.tsx | 16 ++++++++++++---- src/utils/classifiers.ts | 7 +++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/app/containers/PageContainer/components/DefaultHeaderComponent/DefaultHeaderComponent.tsx b/src/app/containers/PageContainer/components/DefaultHeaderComponent/DefaultHeaderComponent.tsx index f49d0d93c..d709c1ae5 100644 --- a/src/app/containers/PageContainer/components/DefaultHeaderComponent/DefaultHeaderComponent.tsx +++ b/src/app/containers/PageContainer/components/DefaultHeaderComponent/DefaultHeaderComponent.tsx @@ -23,7 +23,13 @@ import { import { LanguageToggle } from '../../../../components/LanguageToggle'; import styles from './index.module.scss'; import { ReactComponent as SovLogo } from 'assets/images/sovryn-logo-alpha.svg'; -import { bitocracyUrl, zeroUrl, isMainnet, isStaging } from 'utils/classifiers'; +import { + bitocracyUrl, + zeroUrl, + myntUrl, + isMainnet, + isStaging, +} from 'utils/classifiers'; import { Menu } from 'app/components/Menu'; import { MenuItem } from 'app/components/Menu/components/MenuItem'; import { MenuSeparator } from 'app/components/Menu/components/MenuSeparator'; @@ -109,7 +115,7 @@ export const DefaultHeaderComponent: React.FC = () => { dataActionId: 'header-mobile-lab-link-claim', }, { - to: '/mynt-token', + to: myntUrl, title: t(translations.mainMenu.myntToken), dataActionId: 'header-mobile-lab-link-mynt-token', }, @@ -445,14 +451,16 @@ export const DefaultHeaderComponent: React.FC = () => { {showZero && ( )} diff --git a/src/utils/classifiers.ts b/src/utils/classifiers.ts index 6611e48ff..309c5c13e 100644 --- a/src/utils/classifiers.ts +++ b/src/utils/classifiers.ts @@ -49,6 +49,13 @@ export const zeroUrl = : 'https://live.sovryn.app/zero' : 'https://test.sovryn.app/zero'; +export const myntUrl = + currentNetwork === AppMode.MAINNET + ? isStaging + ? 'https://staging.sovryn.app/mynt-token' + : 'https://live.sovryn.app/mynt-token' + : 'https://test.sovryn.app/mynt-token'; + export const databaseRpcNodes = { 30: 'https://backend.sovryn.app/rpc', 31: 'https://api.test.sovryn.app/rpc',