Prevent logs from getting spammed with connection status
What changed, and why it matters
This commit simply reduces noisy logging. It removes two routine debug messages that were printed every time the wallet checked its connection, and adds one cleaner message only when the connection status actually changes. There is no security fix here.
No security action needed. Treat as routine maintenance/logging cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch in lib/models/wallet_model.dart removes two log() calls inside getIsConnected() that emitted ‘Calling Wallet_connected:’ and ‘Wallet_connected result: $connected’ on every invocation. It adds a single log() call inside the connection-change handler that only fires when isConnected differs from the cached _isConnected state. This is a log-hygiene change with no functional, cryptographic, or network behavior change.
Changed components
lib/models/wallet_model.dartInspect captured patch +1 / −4
diff --git a/lib/models/wallet_model.dart b/lib/models/wallet_model.dart
index dea5339..6e98b1d 100644
--- a/lib/models/wallet_model.dart
+++ b/lib/models/wallet_model.dart
@@ -185,6 +185,7 @@ class WalletModel with ChangeNotifier {
final isConnected = await getIsConnected();
if (isConnected != _isConnected && _w2Wallet != null) {
+ log(LogLevel.info, 'Connection status changed to: $isConnected');
_isConnected = isConnected;
notifyListeners();
}
@@ -844,15 +845,11 @@ class WalletModel with ChangeNotifier {
Future<bool> getIsConnected() async {
final w2WalletFfiAddr = _w2Wallet!.ffiAddress();
- log(LogLevel.info, 'Calling Wallet_connected:');
-
final connected = await Isolate.run(
// ignore: deprecated_member_use
() => monero.Wallet_connected(Pointer<Void>.fromAddress(w2WalletFfiAddr)),
);
- log(LogLevel.info, 'Wallet_connected result: $connected');
-
return connected != 0;
}
Why this scored 15/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.