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 = () => {
66 < Callback
77 onSignInSuccess = { ( tokens : Record < string , string > ) => {
88 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 } > = { } ;
1010
1111 for ( const [ key , value ] of Object . entries ( tokens ) ) {
1212 if ( key . startsWith ( 'acct' ) ) {
@@ -16,8 +16,14 @@ const CallbackPage = () => {
1616 clientAccounts [ value ] = {
1717 loginid : value ,
1818 token : tokens [ tokenKey ] ,
19+ currency : '' ,
1920 } ;
2021 }
22+ } else if ( key . startsWith ( 'cur' ) ) {
23+ const accKey = key . replace ( 'cur' , 'acct' ) ;
24+ if ( tokens [ accKey ] ) {
25+ clientAccounts [ tokens [ accKey ] ] . currency = value ;
26+ }
2127 }
2228 }
2329
@@ -27,8 +33,6 @@ const CallbackPage = () => {
2733 localStorage . setItem ( 'authToken' , tokens . token1 ) ;
2834 localStorage . setItem ( 'active_loginid' , tokens . acct1 ) ;
2935
30- localStorage . setItem ( 'tokens object' , JSON . stringify ( tokens ) ) ;
31-
3236 window . location . assign ( '/' ) ;
3337 } }
3438 renderReturnButton = { ( ) => {
You can’t perform that action at this time.
0 commit comments