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 = () => {
147147 const oauth_url = getOauthURL ( ) ;
148148 const original_url = new URL ( oauth_url ) ;
149149 const configured_server_url = ( LocalStorageUtils . getValue ( LocalStorageConstants . configServerURL ) ||
150+ localStorage . getItem ( 'config.server_url' ) ||
150151 original_url . hostname ) as string ;
151152
152153 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+ ) {
154159 original_url . hostname = configured_server_url ;
155160 }
156161 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 => {
6060 * Uses template literals to compose URLs dynamically.
6161 */
6262export const standalone_routes = {
63- bot : '/' ,
63+ bot : ` ${ window . location . origin } ` ,
6464 cashier : `${ getDerivDomain ( 'derivApp' ) } /cashier/` ,
6565 cashier_deposit : `${ getDerivDomain ( 'derivApp' ) } /cashier/deposit` ,
6666 cashier_p2p : `${ getDerivDomain ( 'derivApp' ) } /cashier/p2p` ,
@@ -78,7 +78,7 @@ export const standalone_routes = {
7878 signup : `https://hub.deriv.com/tradershub/signup` ,
7979 deriv_com : getDerivDomain ( 'derivCom' ) ,
8080 deriv_app : getDerivDomain ( 'derivApp' ) ,
81- endpoint : ' /endpoint' ,
81+ endpoint : ` ${ window . location . origin } /endpoint` ,
8282 account_limits : `${ getDerivDomain ( 'derivApp' ) } /account/account-limits` ,
8383 help_center : `${ getDerivDomain ( 'derivCom' ) } /help-centre/` ,
8484 responsible : `${ getDerivDomain ( 'derivCom' ) } /responsible/` ,
You can’t perform that action at this time.
0 commit comments