You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add menu option to show recovery phrase for existing wallets
Add "Show Recovery Phrase" menu item under Settings that allows users
to view their mnemonic seed phrase for existing HD wallets with a
streamlined view-only interface.
Menu Integration:
- Added Settings → Show Recovery Phrase menu option
- Menu item positioned between "Change Passphrase" and "Unlock Wallet"
- Enabled for HD wallets with private keys
- Disabled for watch-only wallets (NoKeys status)
View-Only Dialog Mode:
- New optional viewOnly parameter in MnemonicVerificationDialog constructor
- Simplified interface without verification step for viewing existing mnemonics
- Window title: "Your Recovery Phrase" (vs "Save Your Mnemonic" for new wallets)
- Button: Single "Close" button (Cancel button hidden)
- Checkbox: "I have written down" checkbox hidden
- Flow: Single-step view without word verification requirement
- Adjusted warning text appropriate for viewing existing phrase
Security Features:
- Prompts for passphrase if wallet is encrypted (unlocks temporarily)
- Validates wallet capabilities (HD enabled, has private keys)
- Clears mnemonic from memory immediately after dialog creation
- Properly restores wallet lock state after viewing:
* Returns to locked state if was locked
* Returns to unlocked-for-mixing state if was in that mode
- Secure memory handling throughout with SecureString
Error Handling:
- Clear error messages for non-HD wallets
- Clear error messages for watch-only wallets
- Graceful handling of user cancellation during unlock
- Proper error recovery with lock state restoration
Backward Compatibility:
- viewOnly parameter defaults to false
- Original verification flow unchanged for new wallet creation
- Existing MnemonicVerificationDialog behavior preserved
This allows users to backup their recovery phrase after wallet creation
without needing to recreate the wallet, with a cleaner UX that skips
unnecessary verification steps when viewing an existing mnemonic.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
// Set warning and instruction text with themed colors
127
144
// Font sizes and weights are defined in general.css
128
-
ui->warningLabel->setText(
129
-
tr("WARNING: If you lose your mnemonic seed phrase, you will lose access to your wallet forever. Write it down in a safe place and never share it with anyone."));
tr("These words can restore your wallet. Keep them safe and private."));
151
+
} else {
152
+
ui->warningLabel->setText(
153
+
tr("WARNING: If you lose your mnemonic seed phrase, you will lose access to your wallet forever. Write it down in a safe place and never share it with anyone."));
0 commit comments