What changed, and why it matters
This commit fixes a UI status bug in the Skylight Wallet app. The wallet home screen could incorrectly show a 'connected' status when it should still show 'connecting' because the logic didn't account for a wallet that reports itself synced but has a synced block height of zero. The patch also removes two leftover debug print statements. There is no direct security vulnerability visible in the diff.
Treat as a routine bugfix/UI polish commit. No security response is indicated. If desired, verify that syncedHeight == 0 is the correct sentinel for an incomplete sync in the underlying wallet service.
Security signals we found
UI state condition corrected to prevent premature 'connected' indication
Debug print statements removed from wallet connection refresh path
No changes to key handling, authentication, or network security code
Evidence from the diff
The change in lib/screens/wallet_home.dart expands the condition that sets connectionStatus to LwsConnectionStatus.connecting. Previously, the UI would stop showing ‘connecting’ once wallet.isConnected && wallet.isSynced was true, even if the actual syncedHeight was 0 (indicating no real sync progress). The new clause wallet.isConnected && wallet.isSynced && (wallet.syncedHeight ?? 0) == 0 keeps the status as ‘connecting’ in that edge case. The lib/models/wallet_model.dart change simply removes two debug print() calls (‘im still alive 1/2’) from the connection refresh path. No cryptographic, authentication, or network-trust code is modified.
Changed components
lib/screens/wallet_home.dartlib/models/wallet_model.dartInspect captured patch +4 / −5
diff --git a/lib/models/wallet_model.dart b/lib/models/wallet_model.dart
index 2e651f5..f5813f0 100644
--- a/lib/models/wallet_model.dart
+++ b/lib/models/wallet_model.dart
@@ -180,8 +180,6 @@ class WalletModel with ChangeNotifier {
return;
}
- print('im still alive 1');
-
final isConnected = await getIsConnected();
if (isConnected != _isConnected) {
@@ -195,8 +193,6 @@ class WalletModel with ChangeNotifier {
return;
}
- print('im still alive 2');
-
await refresh();
await loadAllStats().timeout(Duration(seconds: 20));
diff --git a/lib/screens/wallet_home.dart b/lib/screens/wallet_home.dart
index 283ee81..c5ef9fe 100644
--- a/lib/screens/wallet_home.dart
+++ b/lib/screens/wallet_home.dart
@@ -106,7 +106,10 @@ class _WalletHomeScreenState extends State<WalletHomeScreen> {
TorService.sharedInstance.status ==
TorConnectionStatus.connecting ||
!wallet.hasAttemptedConnection ||
- wallet.isConnected && !wallet.isSynced) {
+ wallet.isConnected && !wallet.isSynced ||
+ wallet.isConnected &&
+ wallet.isSynced &&
+ (wallet.syncedHeight ?? 0) == 0) {
connectionStatus = LwsConnectionStatus.connecting;
}
Why this scored 17/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.