diff --git a/css/master.css b/css/master.css index 6f17f36..30d5847 100644 --- a/css/master.css +++ b/css/master.css @@ -36,7 +36,6 @@ i.fa { } .proposalBlock { - /*margin-top: 6%;*/ padding: 7%; background-color: #ffffff; box-shadow: 0px 17px 24px 0px rgba(0, 0, 0, 0.16); diff --git a/index.html b/index.html index 21919ab..d91db7e 100755 --- a/index.html +++ b/index.html @@ -121,9 +121,19 @@ // check if tx exists in insight txListener.getTx(function(err, res) { - if(err) console.log(err); + if(err) { + console.log("Error:", err); + if(err == 404) { + $('#feeTxid').addClass('validationError'); + $('#feeTxid').val('Transaction ID not found'); + } else if (err == 400) { + $('#feeTxid').addClass('validationError'); + $('#feeTxid').val('Please paste a valid transaction ID'); + } + + } if(res) { - console.log(res); + console.log("Response:", res); // transaction exists, proceed to step three document.getElementById('step_three').click(); @@ -327,71 +337,75 @@
-
+
+
-
diff --git a/js/txListener.js b/js/txListener.js index 7ef1bb9..83da36f 100755 --- a/js/txListener.js +++ b/js/txListener.js @@ -45,7 +45,6 @@ TXListener.prototype.getTx = function(cb) { format: "json" } }; - console.log(opts); this._fetch(opts, cb); }; @@ -80,7 +79,8 @@ TXListener.prototype._fetch = function(opts,cb) { cb(null, data); }, error: function (jqXHR, status, error) { - var err = eval("(" + jqXHR.responseText + ")"); + var err = jqXHR.status; + //var err = eval("(" + jqXHR.responseText + ")"); cb(err, null); } });