Skip to content

Commit

Permalink
Exception when removing wallet
Browse files Browse the repository at this point in the history
Fixes #978
  • Loading branch information
Chralu committed Jun 6, 2024
1 parent 1fc7e6e commit 0767518
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ui/views/authenticate/auto_lock_guard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,13 @@ class _AutoLockGuardState extends ConsumerState<AutoLockGuard>
name: _logName,
);
LockMaskOverlay.instance().hide();
ref.read(AuthenticationProviders.startupMaskVisibility.notifier).state =
StartupMaskVisibility.hidden;

// https://github.com/archethic-foundation/archethic-wallet/issues/978
// Fixes disposed `context` issue when wallet is removed.
if (ref.context.mounted) {
ref.read(AuthenticationProviders.startupMaskVisibility.notifier).state =
StartupMaskVisibility.hidden;
}
}

void _updateLockTimer() {
Expand Down

0 comments on commit 0767518

Please sign in to comment.