X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Findex.js;h=d61c31487d6b70b0b5ee22937ee7c620c21f1fa6;hb=8dd28f2cff4e1f673f4aa7adc93a7254de72a297;hp=9bd77b956d491c117dcac0d6bb6d050a041b0d89;hpb=88311463c74f022177a21c5d88f8928dc8007d8b;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/index.js b/src/js/index.js index 9bd77b9..d61c314 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -38,6 +38,7 @@ DOM.entropyWordCount = DOM.entropyContainer.find(".word-count"); DOM.entropyBinary = DOM.entropyContainer.find(".binary"); DOM.entropyMnemonicLength = DOM.entropyContainer.find(".mnemonic-length"); + DOM.entropyFilterWarning = DOM.entropyContainer.find(".filter-warning"); DOM.phrase = $(".phrase"); DOM.passphrase = $(".passphrase"); DOM.generateContainer = $(".generate-container"); @@ -1061,6 +1062,16 @@ DOM.entropyWordCount.text(wordCount); DOM.entropyBinary.text(entropy.binaryStr); DOM.entropyBitsPerEvent.text(bitsPerEvent); + // detect and warn of filtering + var rawNoSpaces = DOM.entropy.val().replace(/\s/g, ""); + var cleanNoSpaces = entropy.cleanStr.replace(/\s/g, ""); + var isFiltered = rawNoSpaces.length != cleanNoSpaces.length; + if (isFiltered) { + DOM.entropyFilterWarning.removeClass('hidden'); + } + else { + DOM.entropyFilterWarning.addClass('hidden'); + } } function getEntropyTypeStr(entropy) { @@ -1269,6 +1280,14 @@ setHdCoin(60); }, }, + { + name: "FJC - Fujicoin", + p2wpkhNestedInP2shAvailable: false, + onSelect: function() { + network = bitcoinjs.bitcoin.networks.fujicoin; + setHdCoin(75); + }, + }, { name: "GAME - GameCredits", p2wpkhNestedInP2shAvailable: false, @@ -1367,6 +1386,14 @@ setHdCoin(111); }, }, + { + name: "USNBT - NuBits", + p2wpkhNestedInP2shAvailable: false, + onSelect: function() { + network = bitcoinjs.bitcoin.networks.nubits; + setHdCoin(12); + }, + }, { name: "VIA - Viacoin", p2wpkhNestedInP2shAvailable: false,