File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
lib/pages/wallets_view/sub_widgets Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ import '../../../utilities/show_loading.dart';
2424import '../../../utilities/show_node_tor_settings_mismatch.dart' ;
2525import '../../../utilities/text_styles.dart' ;
2626import '../../../utilities/util.dart' ;
27+ import '../../../wallets/crypto_currency/coins/solana.dart' ;
2728import '../../../wallets/crypto_currency/crypto_currency.dart' ;
29+ import '../../../wallets/isar/providers/wallet_info_provider.dart' ;
2830import '../../../wallets/wallet/intermediate/external_wallet.dart' ;
2931import '../../../widgets/dialogs/tor_warning_dialog.dart' ;
3032import '../../../widgets/rounded_white_container.dart' ;
@@ -80,7 +82,23 @@ class WalletListItem extends ConsumerWidget {
8082 }
8183 }
8284
83- if (walletCount == 1 && coin is ! Ethereum ) {
85+ // Check if we should show the wallets overview or open wallet directly.
86+ bool shouldShowWalletsOverview = walletCount > 1 || coin is Ethereum ;
87+
88+ // For Solana and other token-supporting coins, check if any wallet has tokens.
89+ if (! shouldShowWalletsOverview && coin.hasTokenSupport) {
90+ final wallet = ref
91+ .read (pWallets)
92+ .wallets
93+ .firstWhere ((e) => e.info.coin == coin);
94+
95+ final tokenAddresses = ref.read (pWalletTokenAddresses (wallet.walletId));
96+ if (tokenAddresses.isNotEmpty) {
97+ shouldShowWalletsOverview = true ;
98+ }
99+ }
100+
101+ if (walletCount == 1 && ! shouldShowWalletsOverview) {
84102 final wallet = ref
85103 .read (pWallets)
86104 .wallets
You can’t perform that action at this time.
0 commit comments