feat(settings): gate debug options behind a confirmation (+ re-auth if secured)

Revealing the DEBUG OPTIONS dropdown now opens a confirmation modal with a
warning instead of expanding directly. If the wallet is secured, it also requires
re-authentication before the options appear:
- a quick-unlock PIN → verified against the vault (Argon2id derive, off-thread,
  no wallet side effects);
- otherwise an encrypted wallet → the passphrase, verified via walletpassphrase.
Unsecured wallets just confirm. Collapsing needs no gate; each expand re-gates.

App gains debugGateRequiresAuth() + verifyDebugCredential() (cb on the main
thread; secrets wiped). Adds a modal-debug-gate sweep surface. Verified 100% +
150%, dark + light.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 18:46:50 -05:00
parent aa587d1d84
commit 46fb0029b8
6 changed files with 160 additions and 1 deletions

View File

@@ -666,6 +666,14 @@ void I18n::loadBuiltinEnglish()
strings_["debug_logging"] = "DEBUG OPTIONS";
strings_["settings_debug_select"] = "Select categories to enable daemon debug logging (-debug= flags).";
strings_["settings_debug_restart_note"] = "Changes take effect after restarting the daemon.";
// Debug-options gate (confirmation + optional re-auth)
strings_["debug_gate_title"] = "Show debug options?";
strings_["debug_gate_warning"] = "These are advanced diagnostic and node-tuning options. They can expose sensitive information and change how your node runs. Only continue if you know what you're doing.";
strings_["debug_gate_pin_prompt"] = "Enter your unlock PIN to continue:";
strings_["debug_gate_pass_prompt"] = "Enter your wallet passphrase to continue:";
strings_["debug_gate_confirm"] = "Show debug options";
strings_["debug_gate_incorrect"] = "Incorrect PIN or passphrase.";
strings_["debug_gate_verifying"] = "Verifying\xE2\x80\xA6";
// Settings window (legacy dialog) descriptions
strings_["settings_language_note"] = "Note: Some text requires restart to update";