mirror of
https://git.wownero.com/wownero/wownero-wallet-generator.git
synced 2024-08-15 01:03:32 +00:00
Fix generate button being disabled when not using custom entropy
This commit is contained in:
parent
da2e7d937f
commit
c6e3ffb30b
2 changed files with 14 additions and 17 deletions
|
@ -10741,7 +10741,7 @@ bC0zLjUsMjAuNGgtNkwyNDQuOCwzMTAuNkwyNDQuOCwzMTAuNnoiLz4KPC9nPgo8L3N2Zz4K">
|
|||
<div class="row valign-wrapper">
|
||||
<div class="col s4 right-align ">
|
||||
<input class="btn orange" type="button" onclick="js:genwallet(null);"
|
||||
value="Generate wallet" id="gen_with_custom_entropy_button" disabled="disabled" action=""/>
|
||||
value="Generate wallet" id="gen_with_custom_entropy_button" action=""/>
|
||||
<p>Custom entropy for deterministic wallet (leave empty to use the browser's PRNG)</p>
|
||||
<input type="text" value="" id="user_entropy_widget" oninput="js:checkEntropy();" />
|
||||
<div style="color: red; display: none" id="user_entropy_warning_widget">WARNING: entropy is way too low for the wallet to be secure: aim for 256 bits (about a hundred dice throws)</div>
|
||||
|
@ -11121,13 +11121,10 @@ function checkEntropy()
|
|||
var user_entropy = user_entropy_widget.value;
|
||||
var user_entropy_warning_widget = document.getElementById("user_entropy_warning_widget")
|
||||
if (user_entropy.length === 0) {
|
||||
good = false;
|
||||
button.disabled = true
|
||||
user_entropy_warning_widget.style.display = "none"
|
||||
return
|
||||
}
|
||||
|
||||
button.disabled = false
|
||||
var count = new Int32Array(256);
|
||||
for (var n = 0; n < 256; ++n)
|
||||
count[n] = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue