From 32a677a3fb14bf6391c03d265f8ba7833682381f Mon Sep 17 00:00:00 2001 From: balakrishna-binary Date: Mon, 1 Jul 2024 13:01:52 +0800 Subject: [PATCH] fix: trackjs issue --- src/javascript/app/pages/trade/charts/digit_info.js | 4 ++++ src/javascript/config.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/javascript/app/pages/trade/charts/digit_info.js b/src/javascript/app/pages/trade/charts/digit_info.js index 4f91d86a671..d6692179b4f 100644 --- a/src/javascript/app/pages/trade/charts/digit_info.js +++ b/src/javascript/app/pages/trade/charts/digit_info.js @@ -246,6 +246,10 @@ const DigitInfo = (() => { }; const updateChart = async (tick) => { + if (typeof chart === 'undefined') { + return; + } + const decimal_places = await Symbols.getUnderlyingPipSize(tick.tick.symbol); if (stream_id) { if (chart.series[0].name === tick.tick.symbol) { diff --git a/src/javascript/config.js b/src/javascript/config.js index 2d4554d9b8f..08a5714e0c3 100644 --- a/src/javascript/config.js +++ b/src/javascript/config.js @@ -106,7 +106,8 @@ const getSocketURL = () => { const loginid = window.localStorage.getItem('active_loginid'); const is_real = loginid && !/^VRT/.test(loginid); - const server = isProduction() && is_real ? 'green' : 'red'; + const real_server = is_real ? 'green' : 'blue'; + const server = isProduction() ? real_server : 'red'; server_url = `${server}.derivws.com`; }