fix github stupid web editor
What changed, and why it matters
This commit is a trivial cleanup of a duplicate function signature that was accidentally introduced, likely by GitHub's web editor. It removes leftover duplicated lines and keeps the same retry logic. There is no security relevance.
No security action needed. Treat as normal code-quality cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes a duplicated Future<void> _emitEvent({int retries = 0}) async { ... } block that had been inserted mid-function. The resulting code is functionally identical to the intended retry-with-backoff behavior: if offline, wait 500 ms and recurse up to 3 retries. No logic changed; only redundant/erroneous lines were deleted.
Changed components
lib/src/screens/wallet_connect/services/walletkit_service.dartInspect captured patch +2 / −6
diff --git a/lib/src/screens/wallet_connect/services/walletkit_service.dart b/lib/src/screens/wallet_connect/services/walletkit_service.dart
index 48d10f51..5e215ea7 100644
--- a/lib/src/screens/wallet_connect/services/walletkit_service.dart
+++ b/lib/src/screens/wallet_connect/services/walletkit_service.dart
@@ -185,14 +185,10 @@ abstract class WalletKitServiceBase with Store {
}
@action
- Future<void> _emitEvent() async {
+ Future<void> _emitEvent({int retries = 0}) async {
final isOnline = _walletKit.core.connectivity.isOnline.value;
- if (!isOnline) {
+ if (!isOnline && retries < 3) {
await Future.delayed(const Duration(milliseconds: 500));
-Future<void> _emitEvent({int retries = 0}) async {
-final isOnline = _walletKit.core.connectivity.isOnline.value;
-if (!isOnline && retries < 3) {
-await Future.delayed(const Duration(milliseconds: 500));
await _emitEvent(retries: ++retries);
return;
}
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.