From daf50ccbddb5838606bdebd5b91644b78c56b0e3 Mon Sep 17 00:00:00 2001 From: mayuran-deriv Date: Tue, 13 May 2025 12:32:30 +0400 Subject: [PATCH 1/2] fix: currency --- src/components/layout/header/header.tsx | 2 +- src/pages/callback/callback-page.tsx | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/layout/header/header.tsx b/src/components/layout/header/header.tsx index 2c6cf091..458eaa99 100644 --- a/src/components/layout/header/header.tsx +++ b/src/components/layout/header/header.tsx @@ -128,7 +128,7 @@ const AppHeader = observer(() => { const getQueryParams = new URLSearchParams(window.location.search); const currency = getQueryParams.get('account') ?? ''; const query_param_currency = - sessionStorage.getItem('query_param_currency') || currency || 'USD'; + currency || sessionStorage.getItem('query_param_currency') || 'USD'; try { await requestOidcAuthentication({ redirectCallbackUri: `${window.location.origin}/callback`, diff --git a/src/pages/callback/callback-page.tsx b/src/pages/callback/callback-page.tsx index 4d857772..4495d7bd 100644 --- a/src/pages/callback/callback-page.tsx +++ b/src/pages/callback/callback-page.tsx @@ -20,6 +20,15 @@ const getSelectedCurrency = ( getQueryParams.get('account') || sessionStorage.getItem('query_param_currency') || ''; + console.log( + state, + state?.account, + 'www', + getQueryParams.get('account'), + sessionStorage.getItem('query_param_currency') + ); + alert(state); + const firstAccountKey = tokens.acct1; const firstAccountCurrency = clientAccounts[firstAccountKey]?.currency; From 87f4e60fbc6dcc50936778cd3561f5f2b6be7425 Mon Sep 17 00:00:00 2001 From: mayuran-deriv Date: Tue, 13 May 2025 12:34:08 +0400 Subject: [PATCH 2/2] fix: remove alert --- src/pages/callback/callback-page.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/callback/callback-page.tsx b/src/pages/callback/callback-page.tsx index 4495d7bd..d5836fd7 100644 --- a/src/pages/callback/callback-page.tsx +++ b/src/pages/callback/callback-page.tsx @@ -27,7 +27,6 @@ const getSelectedCurrency = ( getQueryParams.get('account'), sessionStorage.getItem('query_param_currency') ); - alert(state); const firstAccountKey = tokens.acct1; const firstAccountCurrency = clientAccounts[firstAccountKey]?.currency;