diff --git a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx index 80cd816deff4..d62a10e45148 100644 --- a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx +++ b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx @@ -41,6 +41,7 @@ const ToggleMenuDrawer = observer(({ platform_config }) => { const { account_status, has_wallet, + is_authorize, is_logged_in, is_logging_in, is_virtual, @@ -92,10 +93,10 @@ const ToggleMenuDrawer = observer(({ platform_config }) => { const TradersHubIcon = is_dark_mode ? 'IcAppstoreHomeDark' : 'IcAppstoreTradersHubHomeUpdated'; React.useEffect(() => { - if (isSuccess && !isSubscribed) { + if (isSuccess && !isSubscribed && is_authorize) { subscribe(); } - }, [isSuccess, p2p_settings, subscribe, isSubscribed]); + }, [isSuccess, p2p_settings, subscribe, isSubscribed, is_authorize]); React.useEffect(() => { const processRoutes = () => { diff --git a/packages/core/src/Stores/client-store.js b/packages/core/src/Stores/client-store.js index 16e33bda1118..d0328268e465 100644 --- a/packages/core/src/Stores/client-store.js +++ b/packages/core/src/Stores/client-store.js @@ -1638,7 +1638,7 @@ export default class ClientStore extends BaseStore { if (this.is_logged_in) { this.getWalletMigrationState(); - await WS.mt5LoginList().then(this.responseMt5LoginList); + await WS.authorized.mt5LoginList().then(this.responseMt5LoginList); WS.tradingServers(CFD_PLATFORMS.MT5).then(this.responseMT5TradingServers); WS.tradingPlatformAvailableAccounts(CFD_PLATFORMS.MT5).then(this.responseTradingPlatformAvailableAccounts);