File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ export const getOauthUrl = () => {
23
23
const hostname = window . location . hostname ;
24
24
25
25
const existingAppId = LocalStorageUtils . getValue ( LocalStorageConstants . configAppId ) ;
26
- const existingServerUrl = localStorage . getItem ( LocalStorageConstants . configServerURL . toString ( ) ) ;
26
+ const existingServerUrl = LocalStorageUtils . getValue ( LocalStorageConstants . configServerURL ) ;
27
27
// since we don't have official app_id for staging,
28
28
// we will use the red server with app_id=62019 for the staging-p2p.deriv.com for now
29
29
// to fix the login issue
30
- if ( ( ! existingAppId || ! existingServerUrl ) && origin === URLConstants . derivP2pStaging ) {
30
+ if ( ! / l o c a l h o s t / . test ( origin ) && ( ! existingAppId || ! existingServerUrl ) ) {
31
31
localStorage . setItem (
32
32
LocalStorageConstants . configServerURL . toString ( ) ,
33
33
SocketURL [ origin as keyof typeof SocketURL ]
@@ -38,8 +38,8 @@ export const getOauthUrl = () => {
38
38
) ;
39
39
}
40
40
41
- const storedServerUrl = localStorage . getItem ( LocalStorageConstants . configServerURL . toString ( ) ) ;
42
- const serverUrl = / q a / . test ( storedServerUrl || '' ) ? storedServerUrl : 'oauth.deriv.com' ;
41
+ const storedServerUrl = LocalStorageUtils . getValue ( LocalStorageConstants . configServerURL ) ;
42
+ const serverUrl = / q a / . test ( String ( storedServerUrl ) ) ? storedServerUrl : 'oauth.deriv.com' ;
43
43
44
44
const appId = LocalStorageUtils . getValue ( LocalStorageConstants . configAppId ) ;
45
45
You can’t perform that action at this time.
0 commit comments