From: Ian Coleman Date: Wed, 2 Aug 2017 06:28:12 +0000 (+1000) Subject: Refactor clearKey to better named clearKeys X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git;a=commitdiff_plain;h=fa2e4e936eea702d9e3ea56b256bbd886ca26bdf Refactor clearKey to better named clearKeys --- diff --git a/src/js/index.js b/src/js/index.js index 84c773f..763967c 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -625,7 +625,7 @@ function clearDisplay() { clearAddressesList(); - clearKey(); + clearKeys(); hideValidationError(); } @@ -641,10 +641,20 @@ } } - function clearKey() { + function clearKeys() { + clearRootKey(); + clearDerivedKeys(); + } + + function clearRootKey() { DOM.rootKey.val(""); + } + + function clearDerivedKeys() { DOM.extendedPrivKey.val(""); DOM.extendedPubKey.val(""); + DOM.bip44accountXprv.val(""); + DOM.bip44accountXpub.val(""); } function addAddressToList(indexText, address, pubkey, privkey) {