Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 8c23f42

Browse files
Sean Hoseanho96
andauthored
Revert "Revert "khalid/add deriv.be domain (#2368)" (#2517)" (#2518)
This reverts commit 0ab9bd3. Co-authored-by: Sean Ho <[email protected]>
1 parent b3310f9 commit 8c23f42

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

gatsby-browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const is_browser = typeof window !== 'undefined'
1515
const checkDomain = () => {
1616
return eval(
1717
decodeURIComponent(
18-
'var%20curhost%20%3D%20window.location.hostname%3B%20var%20t8hvj%20%3D%20%2F%5Cb%28deriv%7Cbinary%7Cbinaryqa%5B0-9%5D%7B2%7D%29%5C.%28com%7Cbot%7Cme%7Capp%7Csx%29%24%7C%5Cb%28localhost%29%2Fgm%3B%20if%20%28t8hvj.test%28curhost%29%20%3D%3D%20false%29%7Balert%28%22Not%20our%20domain%22%29%7D',
18+
'var%20curhost%20%3D%20window.location.hostname%3B%20var%20t8hvj%20%3D%20%2F%5Cb%28deriv%7Cbinary%7Cbinaryqa%5B0-9%5D%7B2%7D%29%5C.%28com%7Cbot%7Cme%7Cbe%7Capp%7Csx%29%24%7C%5Cb%28localhost%29%2Fgm%3B%20if%20%28t8hvj.test%28curhost%29%20%3D%3D%20false%29%7Balert%28%22Not%20our%20domain%22%29%7D',
1919
),
2020
)
2121
}

src/common/constants.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,27 @@ const isBrowser = () => typeof window !== 'undefined'
22

33
const deriv_com_url = 'deriv.com'
44
const deriv_me_url = 'deriv.me'
5+
const deriv_be_url = 'deriv.be'
56

6-
const deriv_com_app_id = 16929
7-
const deriv_me_app_id = 1411
7+
export const deriv_com_app_id = 16929
8+
export const deriv_me_app_id = 1411
9+
export const deriv_be_app_id = 30767
810

9-
const supported_domains = [deriv_com_url, deriv_me_url]
11+
const supported_domains = [deriv_com_url, deriv_me_url, deriv_be_url]
1012
const domain_url =
1113
isBrowser() && supported_domains.includes(window.location.hostname)
1214
? window.location.hostname
1315
: deriv_com_url
1416

17+
const getDomainAppID = () => {
18+
if (domain_url === deriv_me_url) return deriv_me_app_id
19+
else if (domain_url === deriv_be_url) return deriv_be_app_id
20+
else return deriv_com_app_id
21+
}
22+
1523
// URL
1624
export const domain_full_url = `https://${domain_url}`
17-
export const deriv_app_id = domain_url === deriv_com_url ? deriv_com_app_id : deriv_me_app_id
25+
export const deriv_app_id = getDomainAppID()
1826
export const deriv_app_url = `https://app.${domain_url}`
1927
export const deriv_api_url = `https://api.${domain_url}`
2028
export const deriv_bot_app_url = `${deriv_app_url}/bot`

src/common/websocket/config.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,26 @@
77
*
88
*/
99
import { isBrowser } from '../utility'
10-
import { default_server_url } from '../constants'
10+
import {
11+
default_server_url,
12+
deriv_com_app_id,
13+
deriv_me_app_id,
14+
deriv_be_app_id,
15+
} from '../constants'
1116

1217
export const domain_config = {
1318
production: [
1419
{
1520
hostname: 'deriv.com',
16-
app_id: 11780,
21+
app_id: deriv_com_app_id,
1722
},
1823
{
1924
hostname: 'deriv.me',
20-
app_id: 1411,
25+
app_id: deriv_me_app_id,
26+
},
27+
{
28+
hostname: 'deriv.be',
29+
app_id: deriv_be_app_id,
2130
},
2231
],
2332
staging: {

0 commit comments

Comments
 (0)