fix extended key version bytes not updating after switching tabs

This commit is contained in:
Sylvia G
2021-04-06 03:35:24 +03:00
parent 23f393acfb
commit 2c86fb4746

View File

@@ -296,6 +296,7 @@
showPending();
adjustNetworkForSegwit();
var phrase = DOM.phrase.val();
var seed = DOM.seed.val();
if (phrase != "") {
// Calculate and display for mnemonic
var errorText = findPhraseErrors(phrase);
@@ -307,6 +308,11 @@
var passphrase = DOM.passphrase.val();
calcBip32RootKeyFromSeed(phrase, passphrase);
}
else if (seed != "") {
bip32RootKey = libs.bitcoin.HDNode.fromSeedHex(seed, network);
var rootKeyBase58 = bip32RootKey.toBase58();
DOM.rootKey.val(rootKeyBase58);
}
else {
// Calculate and display for root key
var rootKeyBase58 = DOM.rootKey.val();