File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ const CallbackPage = () => {
6
6
< Callback
7
7
onSignInSuccess = { ( tokens : Record < string , string > ) => {
8
8
const accountsList : Record < string , string > = { } ;
9
- const clientAccounts : Record < string , { loginid : string ; token : string } > = { } ;
9
+ const clientAccounts : Record < string , { loginid : string ; token : string ; currency : string } > = { } ;
10
10
11
11
for ( const [ key , value ] of Object . entries ( tokens ) ) {
12
12
if ( key . startsWith ( 'acct' ) ) {
@@ -16,8 +16,14 @@ const CallbackPage = () => {
16
16
clientAccounts [ value ] = {
17
17
loginid : value ,
18
18
token : tokens [ tokenKey ] ,
19
+ currency : '' ,
19
20
} ;
20
21
}
22
+ } else if ( key . startsWith ( 'cur' ) ) {
23
+ const accKey = key . replace ( 'cur' , 'acct' ) ;
24
+ if ( tokens [ accKey ] ) {
25
+ clientAccounts [ tokens [ accKey ] ] . currency = value ;
26
+ }
21
27
}
22
28
}
23
29
@@ -27,8 +33,6 @@ const CallbackPage = () => {
27
33
localStorage . setItem ( 'authToken' , tokens . token1 ) ;
28
34
localStorage . setItem ( 'active_loginid' , tokens . acct1 ) ;
29
35
30
- localStorage . setItem ( 'tokens object' , JSON . stringify ( tokens ) ) ;
31
-
32
36
window . location . assign ( '/' ) ;
33
37
} }
34
38
renderReturnButton = { ( ) => {
You can’t perform that action at this time.
0 commit comments