fix(wallet-switch): late-fail revert, shutdown-freeze, per-wallet PIN gate
The two deferred audit MEDs + the per-wallet PIN follow-up: - Late-init failure revert (MED): the 1.5s start grace only catches a wallet that fails IMMEDIATELY. A wallet that fails LATE in dragonxd init (past the grace) used to persist as a broken active_wallet_file. Now a switch stays "pending confirm" until the daemon actually connects (onConnected clears it); if the connect loop instead hits the crash-wedge (crashCount >= 3) while a switch is pending, it flags the main-thread revert (which also resets the crash count so the restored wallet can start). - Shutdown freeze (MED): the switch worker's 30s daemon-stop wait now breaks promptly when shutdown starts, so beginShutdown's join of the switch task can't freeze the UI for the full 30s (shutdown stops the daemon itself). The seed- adopt task is intentionally left to finish (fund-safety), as before. - Per-wallet PIN (follow-up): App::hasPinVault() (and the lock-screen path) now gate on the per-wallet vault presence alone, not the GLOBAL getPinEnabled flag — so disabling PIN on one wallet no longer suppresses another wallet's PIN quick-unlock after a switch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -899,8 +899,8 @@ void App::renderLockScreen() {
|
||||
cy += captionFont->LegacySize + 12.0f * dp;
|
||||
}
|
||||
|
||||
// Check if PIN vault is available
|
||||
bool hasPinVault = vault_ && vault_->hasVault() && settings_ && settings_->getPinEnabled();
|
||||
// Check if PIN vault is available (per-wallet vault presence; not the global getPinEnabled flag).
|
||||
bool hasPinVault = vault_ && vault_->hasVault();
|
||||
|
||||
// Mode toggle (PIN / Passphrase) — only show if PIN vault exists
|
||||
if (hasPinVault) {
|
||||
|
||||
Reference in New Issue
Block a user