This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +9
-3
lines changed
Expand file tree Collapse file tree 4 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import { useForm } from 'react-hook-form' ;
33import { Button , Text } from '@deriv/ui' ;
44import { getAppId } from '@site/src/utils' ;
5+ import { OAUTH_URL } from '@site/src/utils/constants' ;
56import styles from './Endpoint.module.scss' ;
67
78interface IEndpointFormValues {
@@ -11,7 +12,7 @@ interface IEndpointFormValues {
1112const EndPoint = ( ) => {
1213 const default_endpoint = {
1314 app_id : getAppId ( false ) ,
14- server_url : 'oauth.deriv.com' ,
15+ server_url : OAUTH_URL ,
1516 } ;
1617
1718 const {
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import { useCallback } from 'react';
33
44const useLoginUrl = ( ) => {
55 const getUrl = useCallback ( ( language = 'en' ) => {
6- const { appId, serverUrl } = getServerConfig ( ) ;
7- return generateLoginUrl ( language , serverUrl , appId ) ;
6+ const { appId, oauth } = getServerConfig ( ) ;
7+ return generateLoginUrl ( language , oauth , appId ) ;
88 } , [ ] ) ;
99
1010 return { getUrl } ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ export const STAGING_APP_ID = '36545';
33export const VERCEL_DEPLOYMENT_APP_ID = '35073' ;
44export const LOCALHOST_APP_ID = '35074' ;
55export const DEFAULT_WS_SERVER = 'ws.binaryws.com' ;
6+ export const OAUTH_URL = 'oauth.deriv.com' ;
67
78export const LOGIN_ACCOUNTS_SESSION_STORAGE_KEY = 'login-accounts' ;
89export const CURRENT_LOGIN_ACCOUNT_SESSION_STORAGE_KEY = 'current-login-account' ;
Original file line number Diff line number Diff line change 77 PRODUCTION_APP_ID ,
88 STAGING_APP_ID ,
99 VERCEL_DEPLOYMENT_APP_ID ,
10+ OAUTH_URL ,
1011} from './constants' ;
1112
1213const CURRENCY_MAP = new Map ( [
@@ -130,18 +131,21 @@ export const getServerConfig = () => {
130131 return {
131132 serverUrl : config_server_url ,
132133 appId : config_app_id ,
134+ oauth : OAUTH_URL ,
133135 } ;
134136 } else {
135137 const isLocalHost = isHost ( 'localhost' ) ;
136138 return {
137139 serverUrl : DEFAULT_WS_SERVER ,
138140 appId : getAppId ( isLocalHost ) ,
141+ oauth : OAUTH_URL ,
139142 } ;
140143 }
141144 } else {
142145 return {
143146 serverUrl : DEFAULT_WS_SERVER ,
144147 appId : getAppId ( false ) ,
148+ oauth : OAUTH_URL ,
145149 } ;
146150 }
147151} ;
You can’t perform that action at this time.
0 commit comments