fix(security): color seed-save by outcome; explain the Encrypt button; friendly key-export errors
- Seed-backup dialog: a failed "Save to file" was drawn in the success (green)
colour; it's now red on failure, green on success (flag reset on close).
- Encrypt-wallet dialog: the disabled Encrypt button now says why once the user
starts typing ("Use at least 8 characters." / "The passphrases don't match."),
and a "Show passphrase" checkbox reveals both fields.
- Key-export dialog: the raw RPC exception (e.g. "...walletpassphrase first")
is routed through util::friendlyRpcError(), so a locked wallet reads
"Unlock your wallet first, then try again." instead of daemon jargon.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -197,7 +197,7 @@ void KeyExportDialog::render(App* app)
|
||||
s_key = key;
|
||||
s_show_key = false; // Don't show by default
|
||||
} else {
|
||||
s_error = error;
|
||||
s_error = util::friendlyRpcError(error);
|
||||
}
|
||||
if (!key.empty()) sodium_memzero(&key[0], key.size()); // wipe the last transient copy
|
||||
s_fetching = false;
|
||||
@@ -223,7 +223,7 @@ void KeyExportDialog::render(App* app)
|
||||
s_key = key;
|
||||
s_show_key = true; // Viewing keys are less sensitive
|
||||
} else {
|
||||
s_error = error;
|
||||
s_error = util::friendlyRpcError(error);
|
||||
}
|
||||
if (!key.empty()) sodium_memzero(&key[0], key.size()); // wipe the last transient copy
|
||||
s_fetching = false;
|
||||
|
||||
Reference in New Issue
Block a user