mirror of
https://github.com/OutCast3k/coinbin.git
synced 2025-12-30 13:46:55 +01:00
Merge 2cd9465de9d031eb553304e70a1c281071588730 into cda4559cfd5948dbb18dc078c48a3e62121218e5
This commit is contained in:
commit
474cfeae3d
@ -1280,6 +1280,10 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="signPrivateKeyPassphrase">Passphrase (optional)</label>
|
||||
<input id="signPrivateKeyPassphrase" type="password" class="form-control" value="">
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
@ -1682,7 +1682,18 @@ $(document).ready(function() {
|
||||
|
||||
$("#signBtn").click(function(){
|
||||
var wifkey = $("#signPrivateKey");
|
||||
var passphrase = $("#signPrivateKeyPassphrase");
|
||||
var script = $("#signTransaction");
|
||||
|
||||
if(passphrase.val()!=""){
|
||||
var decrypted = CryptoJS.AES.decrypt(wifkey.val(), passphrase.val()).toString(CryptoJS.enc.Utf8);
|
||||
if(coinjs.addressDecode(decrypted)){
|
||||
$(passphrase).parent().removeClass('has-error');
|
||||
wifkey.val(decrypted);
|
||||
} else {
|
||||
$(passphrase).parent().addClass('has-error');
|
||||
}
|
||||
}
|
||||
|
||||
if(coinjs.addressDecode(wifkey.val())){
|
||||
$(wifkey).parent().removeClass('has-error');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user