Skip to content

Commit

Permalink
Merge pull request #40 from thisyahlen-deriv/thisyahlen/add-fallback-…
Browse files Browse the repository at this point in the history
…to-server-url

chore: add fallback to the server url
  • Loading branch information
ali-hosseini-deriv authored Sep 26, 2024
2 parents 203abe0 + 7c8bdd1 commit be5a659
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 be5a659

Please sign in to comment.