From 69d367be2def4c1be399568bf33f6756472b04e5 Mon Sep 17 00:00:00 2001 From: Ikemefuna Obioha Date: Fri, 19 Jul 2024 18:38:27 +0100 Subject: [PATCH] Fixed add account display bug --- src/modules/common/components/customRoute/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/common/components/customRoute/index.js b/src/modules/common/components/customRoute/index.js index 2487dcc7db..bd4f4066b4 100644 --- a/src/modules/common/components/customRoute/index.js +++ b/src/modules/common/components/customRoute/index.js @@ -5,6 +5,8 @@ import { Redirect, Route } from 'react-router-dom'; import { useAccounts, useCurrentAccount } from '@account/hooks'; import Piwik from 'src/utils/piwik'; import routes from 'src/routes/routes'; +import useSettings from '@settings/hooks/useSettings'; +import networks from '@network/configuration/networks'; import offlineStyle from 'src/modules/common/components/offlineWrapper/offlineWrapper.css'; import { useCheckLegacyAccount } from '@legacy/hooks/queries'; import { useTranslation } from 'react-i18next'; @@ -21,6 +23,10 @@ const CustomRoute = ({ path, exact, isPrivate, forbiddenTokens, component, histo const { isMigrated } = useCheckLegacyAccount(pubkey); const { search = '' } = history.location; const { accounts } = useAccounts(); + const { setValue: setMainChainNetwork } = useSettings('mainChainNetwork'); + if (!isNetworkSet) { + setMainChainNetwork(networks.mainnet); + } Piwik.tracking(history, token);