File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
external/bot-skeleton/services/api Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { useEffect } from 'react';
22import clsx from 'clsx' ;
33import Cookies from 'js-cookie' ;
44import { Outlet } from 'react-router-dom' ;
5- import { api_base } from '@/external/bot-skeleton' ;
65import { useOauth2 } from '@/hooks/auth/useOauth2' ;
76import { requestOidcAuthentication } from '@deriv-com/auth-client' ;
87import { useDevice } from '@deriv-com/ui' ;
@@ -20,13 +19,12 @@ const Layout = () => {
2019 const isLoggedInCookie = Cookies . get ( 'logged_state' ) === 'true' ;
2120 const isEndpointPage = window . location . pathname . includes ( 'endpoint' ) ;
2221 const checkClientAccount = JSON . parse ( localStorage . getItem ( 'clientAccounts' ) ?? '{}' ) ;
23- const checkAccountList = api_base ?. account_info ?. account_list ?? { } ;
22+ const checkAccountList = JSON . parse ( localStorage . getItem ( 'api_account_list' ) ?? '{}' ) ;
2423 const areAccountsEqual = Object . keys ( checkClientAccount ) . length === Object . keys ( checkAccountList ) . length ;
2524
2625 console . log ( 'clientAccounts' , {
2726 checkClientAccount,
2827 checkAccountList,
29- account_list : api_base ?. account_info ?. account_list ,
3028 areAccountsEqual,
3129 } ) ;
3230
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ class APIBase {
177177 this . is_authorized = true ;
178178 this . subscribe ( ) ;
179179 this . getSelfExclusion ( ) ;
180+ localStorage . setItem ( 'api_account_list' , JSON . stringify ( authorize . account_list ) ) ;
180181 } catch ( e ) {
181182 this . is_authorized = false ;
182183 setIsAuthorized ( false ) ;
You can’t perform that action at this time.
0 commit comments