Skip to content

Commit

Permalink
Fixed add account display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ikem-legend committed Jul 19, 2024
1 parent 0096965 commit 69d367b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/common/components/customRoute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);

Expand Down

0 comments on commit 69d367b

Please sign in to comment.