diff --git a/index.html b/index.html
index 58c7994..c3ac21f 100644
--- a/index.html
+++ b/index.html
@@ -150,11 +150,11 @@
if (isAlphaNumeric(txidfield.val())) {
txidfield.unbind( "change" );
console.log('feeTxid seems good: ' + txidfield.val());
- //$("#feeTxid").attr("disabled", true);
console.log("wait while we check the api!");
// first check if transactionid is already in api
$.getJSON(apiserversocket + 'insight-api-dash/tx/' + txidfield.val(), function(data) {
+ txidfield.attr("disabled", true);
var confirmations = data.confirmations;
console.log('Transaction has ' + confirmations + ' confirmation(s)');
if (confirmations != 'undefined' && $.isNumeric(confirmations)) {
@@ -205,14 +205,16 @@
}
else {
console.log('Something went terribly wrong. Faulty api data?');
+ txidfield.attr("disabled", false);
}
}).fail(function(jqXHR) {
if (jqXHR.status == 400) {
// there seems to be a problem with your feeTxid because txid is not found in api
console.log('problem with feeTxid! Ask for new input!');
alert("Check again and please enter your correct TxID!");
- $("#feeTxid").attr("disabled", false);
+ txidfield.attr("disabled", false);
} else {
+ txidfield.attr("disabled", false);
console.log('There seems to be a problem with the api connection');
}
});