Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
change redirection url
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdiyeh-deriv committed Dec 5, 2021
1 parent e944925 commit a7982c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/common/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit a7982c2

Please sign in to comment.