File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/components/shared/utils Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,15 @@ export const generateOAuthURL = () => {
147
147
const oauth_url = getOauthURL ( ) ;
148
148
const original_url = new URL ( oauth_url ) ;
149
149
const configured_server_url = ( LocalStorageUtils . getValue ( LocalStorageConstants . configServerURL ) ||
150
+ localStorage . getItem ( 'config.server_url' ) ||
150
151
original_url . hostname ) as string ;
151
152
152
153
const valid_server_urls = [ 'green.derivws.com' , 'red.derivws.com' , 'blue.derivws.com' ] ;
153
- if ( ! valid_server_urls . includes ( JSON . stringify ( configured_server_url ) ) ) {
154
+ if (
155
+ typeof configured_server_url === 'string'
156
+ ? ! valid_server_urls . includes ( configured_server_url )
157
+ : ! valid_server_urls . includes ( JSON . stringify ( configured_server_url ) )
158
+ ) {
154
159
original_url . hostname = configured_server_url ;
155
160
}
156
161
return original_url . toString ( ) || oauth_url ;
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const getDerivDomain = (service: Service): string => {
60
60
* Uses template literals to compose URLs dynamically.
61
61
*/
62
62
export const standalone_routes = {
63
- bot : '/' ,
63
+ bot : ` ${ window . location . origin } ` ,
64
64
cashier : `${ getDerivDomain ( 'derivApp' ) } /cashier/` ,
65
65
cashier_deposit : `${ getDerivDomain ( 'derivApp' ) } /cashier/deposit` ,
66
66
cashier_p2p : `${ getDerivDomain ( 'derivApp' ) } /cashier/p2p` ,
@@ -78,7 +78,7 @@ export const standalone_routes = {
78
78
signup : `https://hub.deriv.com/tradershub/signup` ,
79
79
deriv_com : getDerivDomain ( 'derivCom' ) ,
80
80
deriv_app : getDerivDomain ( 'derivApp' ) ,
81
- endpoint : ' /endpoint' ,
81
+ endpoint : ` ${ window . location . origin } /endpoint` ,
82
82
account_limits : `${ getDerivDomain ( 'derivApp' ) } /account/account-limits` ,
83
83
help_center : `${ getDerivDomain ( 'derivCom' ) } /help-centre/` ,
84
84
responsible : `${ getDerivDomain ( 'derivCom' ) } /responsible/` ,
You can’t perform that action at this time.
0 commit comments