diff --git a/src/common/util.js b/src/common/util.js index 0ca234038..7f2af730f 100755 --- a/src/common/util.js +++ b/src/common/util.js @@ -517,6 +517,14 @@ function getBinaryUrl(page) { return binary_url; } +function getBinaryUrlWithoutLng(page) { + var hostname = new URL(window.location.href).hostname; + var domain = hostname.includes('binary.me') ? '.me' : '.com'; + var binary_url = 'https://binary' + domain + '/' + page; + + return binary_url; +} + function getDerivUrl(page) { var hostname = new URL(window.location.href).hostname; var lang = (local_storage.get('i18n') || {value: 'en'}).value; diff --git a/src/index.js b/src/index.js index f70b70270..bc900db93 100644 --- a/src/index.js +++ b/src/index.js @@ -90,7 +90,7 @@ function processRedirect(selected_language_name) { } } if ((!isEuCountrySelected(ip_country) && has_mf) || (isEuCountrySelected(residence_country) && account_list.length == 1)){ - window.location.href = getBinaryUrl('move-to-deriv') + window.location.href = getBinaryUrlWithoutLng('move-to-deriv') } else { window.location.href = VERSION + 'main.html'; }