Skip to content

Commit

Permalink
Improve GUI import too
Browse files Browse the repository at this point in the history
  • Loading branch information
JSKitty committed Jul 8, 2023
1 parent 8b9ece7 commit f20be50
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/global.js
Expand Up @@ -1378,6 +1378,7 @@ export async function onPrivateKeyChanged() {
* Imports a wallet using the GUI input, handling decryption via UI
*/
export async function guiImportWallet() {
// Important: These fields will be wiped by importWallet();
const strPrivKey = doms.domPrivKey.value;
const strPassword = doms.domPrivKeyPassword.value;
const fEncrypted = strPrivKey.length >= 128 && isBase64(strPrivKey);
Expand Down Expand Up @@ -1406,6 +1407,9 @@ export async function guiImportWallet() {
encWif: strPrivKey,
});
}
// Destroy residue import data
doms.domPrivKey.value = '';
doms.domPrivKeyPassword.value = '';
return;
}
}
Expand Down

0 comments on commit f20be50

Please sign in to comment.