File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,20 @@ const SocketURL = {
19
19
} ;
20
20
21
21
export const getOauthUrl = ( ) => {
22
- const hostname = window . location . origin ;
22
+ const origin = window . location . origin ;
23
+ const hostname = window . location . hostname ;
23
24
24
25
// since we don't have official app_id for staging,
25
26
// we will use the red server with app_id=62019 for the staging-p2p.deriv.com for now
26
27
// to fix the login issue
27
- if ( hostname === URLConstants . derivP2pStaging ) {
28
+ if ( origin === URLConstants . derivP2pStaging ) {
28
29
localStorage . setItem (
29
30
LocalStorageConstants . configServerURL . toString ( ) ,
30
- SocketURL [ hostname as keyof typeof SocketURL ]
31
+ SocketURL [ origin as keyof typeof SocketURL ]
31
32
) ;
32
33
localStorage . setItem (
33
34
LocalStorageConstants . configAppId ,
34
- `https:// ${ AppIDConstants . domainAppId [ hostname as keyof typeof AppIDConstants . domainAppId ] } `
35
+ `${ AppIDConstants . domainAppId [ hostname as keyof typeof AppIDConstants . domainAppId ] } `
35
36
) ;
36
37
}
37
38
You can’t perform that action at this time.
0 commit comments