Skip to content

Commit

Permalink
peercoin#3 trim input for verify transactions and other scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Matvei Vasily committed Jan 21, 2020
1 parent 6513bdf commit 8d15044
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions js/cointoolkit.js
Expand Up @@ -2444,11 +2444,18 @@ $(document).ready(function() {
});

/* redeem for trim user's input */
$("#redeemFrom").focusout(function(){
var wif = $("#redeemFrom").val();
wif = wif.replace(/\s/g, "");
$("#redeemFrom").val(wif);
});
var trimInputs = ["redeemFrom", "verifyScript"];
for (i = 0 ; i < trimInputs.length ; i ++) {
item = "#" + trimInputs[i];
console.log(item);
$(item).focusout(function(){
var wif = $(this).val();
wif = wif.replace(/\s/g, "");
console.log(wif);
$(this).val(wif);
});
}


/* redeem from button code */
$("#redeemFromBtn").click(function(){
Expand Down

0 comments on commit 8d15044

Please sign in to comment.