What changed, and why it matters
This commit fixes how the mobile app navigates to Solana token wallets. Previously, tapping a Solana token card may have opened the wrong wallet view or skipped the token-specific screen. The change makes sure Solana tokens open their dedicated token view and that the wallets overview is shown when a Solana wallet has tokens. There is no indication this is a security fix; it appears to be a user-interface/navigation bug fix.
Treat as a routine UI/UX fix. No security response required. If triaging, verify that Solana token navigation behaves correctly on mobile and desktop builds.
Security signals we found
No security-relevant keywords in commit title or message
No changes to cryptography, key storage, authentication, or network calls
Navigation-only UI change in Dart/Flutter code
No vendor or researcher attribution for a security issue
Evidence from the diff
The patch updates two Flutter UI files. In wallet_list_item.dart, it introduces a check for coins with token support (notably Solana) so that when a wallet has token addresses, the app shows the wallets overview instead of opening the single wallet directly. In wallet_card.dart, it wraps the main wallet navigation in a null-check for contractAddress and routes Solana SPL tokens to SolTokenView / DesktopSolTokenView with the tokenMint argument, rather than the generic TokenView/DesktopTokenView. The diff shows no cryptographic, authentication, or data-integrity changes.
Changed components
lib/pages/wallets_view/sub_widgets/wallet_list_item.dartlib/widgets/wallet_card.dartInspect captured patch +41 / −19
diff --git a/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart b/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart
index 64d9ecb..42955e0 100644
--- a/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart
+++ b/lib/pages/wallets_view/sub_widgets/wallet_list_item.dart
@@ -24,7 +24,9 @@ import '../../../utilities/show_loading.dart';
import '../../../utilities/show_node_tor_settings_mismatch.dart';
import '../../../utilities/text_styles.dart';
import '../../../utilities/util.dart';
+import '../../../wallets/crypto_currency/coins/solana.dart';
import '../../../wallets/crypto_currency/crypto_currency.dart';
+import '../../../wallets/isar/providers/wallet_info_provider.dart';
import '../../../wallets/wallet/intermediate/external_wallet.dart';
import '../../../widgets/dialogs/tor_warning_dialog.dart';
import '../../../widgets/rounded_white_container.dart';
@@ -80,7 +82,23 @@ class WalletListItem extends ConsumerWidget {
}
}
- if (walletCount == 1 && coin is! Ethereum) {
+ // Check if we should show the wallets overview or open wallet directly.
+ bool shouldShowWalletsOverview = walletCount > 1 || coin is Ethereum;
+
+ // For Solana and other token-supporting coins, check if any wallet has tokens.
+ if (!shouldShowWalletsOverview && coin.hasTokenSupport) {
+ final wallet = ref
+ .read(pWallets)
+ .wallets
+ .firstWhere((e) => e.info.coin == coin);
+
+ final tokenAddresses = ref.read(pWalletTokenAddresses(wallet.walletId));
+ if (tokenAddresses.isNotEmpty) {
+ shouldShowWalletsOverview = true;
+ }
+ }
+
+ if (walletCount == 1 && !shouldShowWalletsOverview) {
final wallet = ref
.read(pWallets)
.wallets
diff --git a/lib/widgets/wallet_card.dart b/lib/widgets/wallet_card.dart
index d545f3d..11fec09 100644
--- a/lib/widgets/wallet_card.dart
+++ b/lib/widgets/wallet_card.dart
@@ -15,8 +15,10 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../models/isar/models/ethereum/eth_contract.dart';
import '../models/isar/models/solana/spl_token.dart';
+import '../pages/token_view/sol_token_view.dart';
import '../pages/token_view/token_view.dart';
import '../pages/wallet_view/wallet_view.dart';
+import '../pages_desktop_specific/my_stack_view/wallet_view/desktop_sol_token_view.dart';
import '../pages_desktop_specific/my_stack_view/wallet_view/desktop_token_view.dart';
import '../pages_desktop_specific/my_stack_view/wallet_view/desktop_wallet_view.dart';
import '../providers/db/main_db_provider.dart';
@@ -170,20 +172,22 @@ class SimpleWalletCard extends ConsumerWidget {
);
if (popPrevious) nav.pop();
- if (desktopNavigatorState != null) {
- unawaited(
- desktopNavigatorState!.pushNamed(
- DesktopWalletView.routeName,
- arguments: walletId,
- ),
- );
- } else {
- unawaited(
- nav.pushNamed(
- WalletView.routeName,
- arguments: walletId,
- ),
- );
+ if (contractAddress == null) {
+ if (desktopNavigatorState != null) {
+ unawaited(
+ desktopNavigatorState!.pushNamed(
+ DesktopWalletView.routeName,
+ arguments: walletId,
+ ),
+ );
+ } else {
+ unawaited(
+ nav.pushNamed(
+ WalletView.routeName,
+ arguments: walletId,
+ ),
+ );
+ }
}
if (contractAddress != null) {
@@ -220,13 +224,13 @@ class SimpleWalletCard extends ConsumerWidget {
if (desktopNavigatorState != null) {
await desktopNavigatorState!.pushNamed(
- DesktopTokenView.routeName,
- arguments: walletId,
+ DesktopSolTokenView.routeName,
+ arguments: (walletId: walletId, tokenMint: contractAddress!),
);
} else {
await nav.pushNamed(
- TokenView.routeName,
- arguments: (walletId: walletId, popPrevious: !Util.isDesktop),
+ SolTokenView.routeName,
+ arguments: (walletId: walletId, tokenMint: contractAddress!),
);
}
} else {
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.