Skip to content

Commit

Permalink
Merge pull request #256 from rupato-deriv/Rupato/Test-silent-login-
Browse files Browse the repository at this point in the history
fix: silent login
  • Loading branch information
rupato-deriv authored Feb 17, 2025
2 parents 41bc84b + 3df31e7 commit 1583313
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function App() {
};

React.useEffect(() => {
const accounts_list = JSON.parse(localStorage.getItem('accountsList') || '{}');
const accounts_list = localStorage.getItem('accountsList') || '{}';
const cookie_accounts = Cookies.get('client.accounts') || '{}';
const stored_accounts = JSON.parse(localStorage.getItem('clientAccounts') || '{}');

Expand All @@ -80,11 +80,10 @@ function App() {
accounts_list[loginid] = data.token;
});

localStorage.setItem('accountsList', JSON.stringify(accounts_list));
localStorage.setItem('accountsList', accounts_list);
} else {
console.error('Invalid cookie_accounts format');
}
localStorage.setItem('accountsList', JSON.stringify(accounts_list));

const client_accounts = {
...stored_accounts,
Expand Down

0 comments on commit 1583313

Please sign in to comment.