From 6993d428920144da1024226b64c77b11a821290f Mon Sep 17 00:00:00 2001 From: Shayan Khaleghparast <100833613+shayan-deriv@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:05:34 +0800 Subject: [PATCH] Revert "chore: fix localstorage key name" --- src/context/auth-context.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/context/auth-context.tsx b/src/context/auth-context.tsx index 868fc82..b6d0ef0 100644 --- a/src/context/auth-context.tsx +++ b/src/context/auth-context.tsx @@ -75,7 +75,7 @@ export const AuthDataProvider = ({ children }: AuthDataProviderProps) => { accountsList[account.loginid] = account.token; }); - localStorage.setItem('client.accounts', JSON.stringify(accountsList)); + localStorage.setItem('accountsList', JSON.stringify(accountsList)); URLUtils.filterSearchParams(paramsToDelete); @@ -94,7 +94,7 @@ export const AuthDataProvider = ({ children }: AuthDataProviderProps) => { const appendAccountLocalStorage = useCallback((loginid: string, token: string) => { accountsList[loginid] = token; - localStorage.setItem('client.accounts', JSON.stringify(accountsList)); + localStorage.setItem('accountsList', JSON.stringify(accountsList)); switchAccount(loginid); }, []); @@ -102,7 +102,7 @@ export const AuthDataProvider = ({ children }: AuthDataProviderProps) => { const logout = useCallback(async () => { await requestLogout({}); localStorage.removeItem('authToken'); - localStorage.removeItem('client.accounts'); + localStorage.removeItem('accountsList'); setActiveLoginid(''); }, []);