@@ -59,14 +59,14 @@ function App() {
59
59
} ;
60
60
} , [ ] ) ;
61
61
62
- // const updateAccountParamInURL = (account_data: TAuthData['account_list'][number], fallback_currency = '') => {
63
- // const search_params = new URLSearchParams(window.location.search);
64
- // const account_param = account_data.loginid.startsWith('VR')
65
- // ? 'demo'
66
- // : account_data.currency || fallback_currency;
67
- // search_params.set('account', account_param);
68
- // window.history.pushState({}, '', `${window.location.pathname}?${search_params.toString()}`);
69
- // };
62
+ const updateAccountParamInURL = ( account_data : TAuthData [ 'account_list' ] [ number ] , fallback_currency = '' ) => {
63
+ const search_params = new URLSearchParams ( window . location . search ) ;
64
+ const account_param = account_data . loginid . startsWith ( 'VR' )
65
+ ? 'demo'
66
+ : account_data . currency || fallback_currency ;
67
+ search_params . set ( 'account' , account_param ) ;
68
+ window . history . pushState ( { } , '' , `${ window . location . pathname } ?${ search_params . toString ( ) } ` ) ;
69
+ } ;
70
70
71
71
React . useEffect ( ( ) => {
72
72
const accounts_list = localStorage . getItem ( 'accountsList' ) ;
@@ -85,7 +85,7 @@ function App() {
85
85
) ;
86
86
if ( ! selected_account ) return ;
87
87
const [ /* eslint-disable-line @typescript-eslint/no-unused-vars */ _ , account ] = selected_account ;
88
- // updateAccountParamInURL(account);
88
+ updateAccountParamInURL ( account ) ;
89
89
} catch ( e ) {
90
90
console . warn ( 'Error' , e ) ; // eslint-disable-line no-console
91
91
}
@@ -142,7 +142,7 @@ function App() {
142
142
) ;
143
143
if ( ! selected_account ) return ;
144
144
const [ _ , account ] = selected_account ; // eslint-disable-line @typescript-eslint/no-unused-vars
145
- // updateAccountParamInURL(account, 'USD');
145
+ updateAccountParamInURL ( account , 'USD' ) ;
146
146
}
147
147
} catch ( e ) {
148
148
console . warn ( 'Error' , e ) ; // eslint-disable-line no-console
0 commit comments