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';
2
2
import clsx from 'clsx' ;
3
3
import Cookies from 'js-cookie' ;
4
4
import { Outlet } from 'react-router-dom' ;
5
- import { api_base } from '@/external/bot-skeleton' ;
6
5
import { useOauth2 } from '@/hooks/auth/useOauth2' ;
7
6
import { requestOidcAuthentication } from '@deriv-com/auth-client' ;
8
7
import { useDevice } from '@deriv-com/ui' ;
@@ -20,13 +19,12 @@ const Layout = () => {
20
19
const isLoggedInCookie = Cookies . get ( 'logged_state' ) === 'true' ;
21
20
const isEndpointPage = window . location . pathname . includes ( 'endpoint' ) ;
22
21
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' ) ?? '{}' ) ;
24
23
const areAccountsEqual = Object . keys ( checkClientAccount ) . length === Object . keys ( checkAccountList ) . length ;
25
24
26
25
console . log ( 'clientAccounts' , {
27
26
checkClientAccount,
28
27
checkAccountList,
29
- account_list : api_base ?. account_info ?. account_list ,
30
28
areAccountsEqual,
31
29
} ) ;
32
30
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ class APIBase {
177
177
this . is_authorized = true ;
178
178
this . subscribe ( ) ;
179
179
this . getSelfExclusion ( ) ;
180
+ localStorage . setItem ( 'api_account_list' , JSON . stringify ( authorize . account_list ) ) ;
180
181
} catch ( e ) {
181
182
this . is_authorized = false ;
182
183
setIsAuthorized ( false ) ;
You can’t perform that action at this time.
0 commit comments