<div class="container">
<h1 class="text-center">Mnemonic Code Converter</h1>
- <p class="version">v0.2.1</p>
+ <p class="version">v0.2.2</p>
<hr>
<div class="row">
<div class="col-md-12">
function delayedPhraseChanged() {
hideValidationError();
+ seed = null;
+ bip32RootKey = null;
+ bip32ExtendedKey = null;
+ clearAddressesList();
showPending();
if (phraseChangeTimeoutEvent != null) {
clearTimeout(phraseChangeTimeoutEvent);
function phraseChanged() {
showPending();
- hideValidationError();
setMnemonicLanguage();
// Get the mnemonic phrase
var phrase = DOM.phrase.val();
var passphrase = DOM.passphrase.val();
calcBip32RootKeyFromSeed(phrase, passphrase);
calcForDerivationPath();
- hidePending();
}
function delayedEntropyChanged() {
}
function calcForDerivationPath() {
- showPending();
clearDerivedKeys();
clearAddressesList();
- hideValidationError();
+ showPending();
// Don't show bip49 if it's selected but network doesn't support it
if (bip49TabSelected() && !networkHasBip49()) {
return;
displayBip49Info();
}
displayBip32Info();
- hidePending();
}
function generateClicked() {
for (var i=0; i<rows.length; i++) {
rows[i].shouldGenerate = false;
}
+ hidePending();
}
for (var i=0; i<total; i++) {
var index = i + start;
- rows.push(new TableRow(index));
+ var isLast = i == total - 1;
+ rows.push(new TableRow(index, isLast));
}
})());
}
- function TableRow(index) {
+ function TableRow(index, isLast) {
var self = this;
this.shouldGenerate = true;
address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
}
addAddressToList(indexText, address, pubkey, privkey);
+ if (isLast) {
+ hidePending();
+ }
}, 50)
}
+# 0.2.2
+
+* Improve showing feedback for pending calculations
+* Bugfix: Clear old seed when mnemonic is changed
+* Add PIVX network
+
# 0.2.1
* BTC is the default coin
<div class="container">
<h1 class="text-center">Mnemonic Code Converter</h1>
- <p class="version">v0.2.1</p>
+ <p class="version">v0.2.2</p>
<hr>
<div class="row">
<div class="col-md-12">
function delayedPhraseChanged() {
hideValidationError();
+ seed = null;
+ bip32RootKey = null;
+ bip32ExtendedKey = null;
+ clearAddressesList();
showPending();
if (phraseChangeTimeoutEvent != null) {
clearTimeout(phraseChangeTimeoutEvent);
function phraseChanged() {
showPending();
- hideValidationError();
setMnemonicLanguage();
// Get the mnemonic phrase
var phrase = DOM.phrase.val();
var passphrase = DOM.passphrase.val();
calcBip32RootKeyFromSeed(phrase, passphrase);
calcForDerivationPath();
- hidePending();
}
function delayedEntropyChanged() {
}
function calcForDerivationPath() {
- showPending();
clearDerivedKeys();
clearAddressesList();
- hideValidationError();
+ showPending();
// Don't show bip49 if it's selected but network doesn't support it
if (bip49TabSelected() && !networkHasBip49()) {
return;
displayBip49Info();
}
displayBip32Info();
- hidePending();
}
function generateClicked() {
for (var i=0; i<rows.length; i++) {
rows[i].shouldGenerate = false;
}
+ hidePending();
}
for (var i=0; i<total; i++) {
var index = i + start;
- rows.push(new TableRow(index));
+ var isLast = i == total - 1;
+ rows.push(new TableRow(index, isLast));
}
})());
}
- function TableRow(index) {
+ function TableRow(index, isLast) {
var self = this;
this.shouldGenerate = true;
address = bitcoinjs.bitcoin.address.fromOutputScript(scriptpubkey, network)
}
addAddressToList(indexText, address, pubkey, privkey);
+ if (isLast) {
+ hidePending();
+ }
}, 50)
}
});
},
+// github issue 43
+// Cleared mnemonic and root key still allows addresses to be generated
+// https://github.com/iancoleman/bip39/issues/43
+function() {
+page.open(url, function(status) {
+ // set the phrase
+ page.evaluate(function() {
+ $("#bip49-tab a").click();
+ $(".phrase").val("abandon abandon ability");
+ $(".phrase").trigger("input");
+ });
+ waitForGenerate(function() {
+ // clear the mnemonic and root key
+ page.evaluate(function() {
+ $(".phrase").val("");
+ $(".phrase").trigger("input");
+ $(".root-key").val("");
+ $(".root-key").trigger("input");
+ $(".more").click();
+ });
+ waitForFeedback(function() {
+ // check there are no addresses shown
+ var addressCount = page.evaluate(function() {
+ return $(".address").length;
+ });
+ if (addressCount != 0) {
+ console.log("Clearing mnemonic should not allow addresses to be generated");
+ fail();
+ }
+ next();
+ });
+ });
+});
+},
+
// If you wish to add more tests, do so here...
// Here is a blank test template