Skip to content

Commit

Permalink
link to Blockscout explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaranov committed Oct 3, 2018
1 parent 0ec80bd commit a6d5890
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.11.3
v8.12.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"gasLimit": "type Ethereum transaction gas limit here, for example, 0x7b0c",
"live": {
"rpc": "type Ethereum RPC address here, for example http://127.0.0.1:8545",
"account": "type sender address here, for example, 0xf36045454F66C7318adCDdF3B801E3bF8CfBc6a1",
"privateKey": "type private key of sender here, for example, 54dd4125ed5418a7a68341413f4006256159f9f5ade8fed94e82785ef59523ab"
"account": "type sender address here",
"privateKey": "type private key of sender here"
},
"dev": {
...
Expand Down
1 change: 0 additions & 1 deletion controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module.exports = function (app) {
console.log("REQUEST:")
console.log(request.body)
var recaptureResponse = request.body["g-recaptcha-response"];
//console.log("recaptureResponse: ", recaptureResponse)
if (!recaptureResponse) return generateErrorResponse(response, {code: 500, title: "Error", message: "Invalid captcha"});

var receiver = request.body.receiver;
Expand Down
3 changes: 1 addition & 2 deletions helpers/captchaHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = function (app) {
debug(post_data_json);
debug(post_data);

// An object of options to indicate where to post to
var post_options = {
host: "www.google.com",
port: '443',
Expand Down Expand Up @@ -58,7 +57,7 @@ module.exports = function (app) {
debug(err);
reject(err);
});
// post the data

post_req.write(post_data, 'binary', function(e) {
if (e) debug(e);
});
Expand Down
7 changes: 2 additions & 5 deletions public/assets/javascripts/application/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
$(function() {
var loader = $(".loading-container");
$( "#faucetForm" ).submit(function( e ) {
//$( "#requestTokens" ).click(function( e ) {
e.preventDefault();
$this = $(this);
loader.removeClass("hidden");
var receiver = $("#receiver").val();
$.ajax({
url:"/",
type:"POST",
data: $this.serialize()/*{,
receiver: receiver
}*/
data: $this.serialize()
}).done(function(data) {
grecaptcha.reset();
if (!data.success) {
Expand All @@ -25,7 +22,7 @@ $(function() {
$("#receiver").val('');
loader.addClass("hidden");
swal("Success",
`0.5 SPOA has successfully transferred to <a href="https://sokol.poaexplorer.com/txid/search/${data.success.txHash}" target="blank">${receiver}</a>`,
`0.5 SPOA has successfully transferred to <a href="https://blockscout.com/poa/sokol/tx/${data.success.txHash}" target="blank">${receiver}</a>`,
"success"
);
}).fail(function(err) {
Expand Down

0 comments on commit a6d5890

Please sign in to comment.