We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f02c8ea commit 4928bb2Copy full SHA for 4928bb2
src/pages/callback/callback-page.tsx
@@ -57,7 +57,13 @@ const CallbackPage = () => {
57
.filter(key => key.startsWith('cur'))
58
.map(key => tokens[key]);
59
const is_valid_currency = currencies.includes(state?.account || currency || '');
60
- const selected_currency = is_valid_currency ? state?.account || currency : 'USD';
+
61
+ const firstAccountKey = Object.keys(clientAccounts)[0];
62
+ const firstAccountCurrency = clientAccounts[tokens.acct1]
63
+ ? clientAccounts[firstAccountKey].currency
64
+ : null;
65
+ const selected_currency =
66
+ (is_valid_currency ? state?.account?.currency || currency : currency) || firstAccountCurrency;
67
window.location.assign(`/?account=${selected_currency}`);
68
}}
69
renderReturnButton={() => {
0 commit comments