Skip to content

Commit b917e7c

Browse files
fix: url with config.server_url due log in
1 parent e198ea0 commit b917e7c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/shared/utils/config/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LocalStorageConstants, LocalStorageUtils, URLUtils } from '@deriv-com/utils';
1+
import { LocalStorageConstants, URLUtils } from '@deriv-com/utils';
22
import { isStaging } from '../url/helpers';
33

44
export const APP_IDS = {
@@ -146,8 +146,9 @@ export const generateOAuthURL = () => {
146146
const { getOauthURL } = URLUtils;
147147
const oauth_url = getOauthURL();
148148
const original_url = new URL(oauth_url);
149-
const configured_server_url = (LocalStorageUtils.getValue(LocalStorageConstants.configServerURL) ||
150-
original_url.hostname) as string;
149+
const configured_server_url = localStorage.getItem(
150+
LocalStorageConstants.configServerURL || original_url.hostname
151+
) as string;
151152

152153
const valid_server_urls = ['green.derivws.com', 'red.derivws.com', 'blue.derivws.com'];
153154
if (!valid_server_urls.includes(configured_server_url)) {

0 commit comments

Comments
 (0)