fix: the delete wallet screens name the wallet's own key material (closes #529)
DeleteWallet and DeleteWalletLostPassword told key and xprv wallets that their recovery phrase was the way back, but those wallets have none. Both screens now name the recovery phrase, the private key or the extended private key, according to the wallet's kind. The noun comes from keyMaterialName() in the popup view helpers, which DeleteAddress now uses too in place of its own two-way choice, so these three screens get it from one place. The lost-password screen's route-back sentence is reworded to fit all three kinds. Model: opus-5-5
This commit was merged in pull request #590.
This commit is contained in:
@@ -7,6 +7,7 @@ const {
|
||||
goBack,
|
||||
clearViewStack,
|
||||
onViewLeave,
|
||||
keyMaterialName,
|
||||
} = require("./helpers");
|
||||
const { state, saveState } = require("../../shared/state");
|
||||
const { decryptWithPassword } = require("../../shared/vault");
|
||||
@@ -75,6 +76,9 @@ function show(walletIdx) {
|
||||
clear();
|
||||
deleteWalletIndex = walletIdx;
|
||||
$("delete-wallet-name").textContent = displayName(walletIdx);
|
||||
$("delete-wallet-key-material").textContent = keyMaterialName(
|
||||
state.wallets[walletIdx],
|
||||
);
|
||||
showView("delete-wallet-confirm");
|
||||
}
|
||||
|
||||
@@ -94,6 +98,9 @@ function showLostPassword() {
|
||||
clearLostPassword();
|
||||
$("delete-wallet-lost-name").textContent = name;
|
||||
$("delete-wallet-lost-name-echo").textContent = name;
|
||||
$("delete-wallet-lost-key-material").textContent = keyMaterialName(
|
||||
state.wallets[walletIdx],
|
||||
);
|
||||
// showView() runs the leave hook of delete-wallet-confirm, which nulls
|
||||
// deleteWalletIndex, so this screen's own selection is recorded after
|
||||
// it and not before.
|
||||
|
||||
Reference in New Issue
Block a user