From 7c8bdd1651a5ba6ce65b5fbe25823e4e383f4617 Mon Sep 17 00:00:00 2001 From: Thisyahlen Date: Thu, 26 Sep 2024 09:16:14 +0800 Subject: [PATCH] chore: add fallback to the server url --- src/constants/urls.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/constants/urls.ts b/src/constants/urls.ts index c5648f4..cd88530 100644 --- a/src/constants/urls.ts +++ b/src/constants/urls.ts @@ -29,7 +29,10 @@ export const getServerInfo = () => { ); } - const storedServerUrl = LocalStorageUtils.getValue(LocalStorageConstants.configServerURL); + const storedServerUrl = + LocalStorageUtils.getValue(LocalStorageConstants.configServerURL) || + localStorage.getItem('config.server_url'); + const serverUrl = /qa/.test(String(storedServerUrl)) ? storedServerUrl : 'oauth.deriv.com'; const appId = LocalStorageUtils.getValue(LocalStorageConstants.configAppId);