Skip to content

Commit

Permalink
chore: add fallback to the server url
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv committed Sep 26, 2024
1 parent e15802c commit 7c8bdd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/constants/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const getServerInfo = () => {
);
}

const storedServerUrl = LocalStorageUtils.getValue<string>(LocalStorageConstants.configServerURL);
const storedServerUrl =
LocalStorageUtils.getValue<string>(LocalStorageConstants.configServerURL) ||
localStorage.getItem('config.server_url');

const serverUrl = /qa/.test(String(storedServerUrl)) ? storedServerUrl : 'oauth.deriv.com';

const appId = LocalStorageUtils.getValue<string>(LocalStorageConstants.configAppId);
Expand Down

0 comments on commit 7c8bdd1

Please sign in to comment.