Merge pull request #2 from Swader/master
Fixed contract generation and deposits. Improved faucet. Fixed determ…
This commit is contained in:
commit
52516d647d
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
|
@ -2,17 +2,17 @@ $(function() {
|
||||||
var loader = $(".loading-container");
|
var loader = $(".loading-container");
|
||||||
updateBalance();
|
updateBalance();
|
||||||
// on form submit
|
// on form submit
|
||||||
$( "#faucetForm" ).submit(function( e ) {
|
$( ".ff" ).submit(function( e ) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$this = $(this);
|
$this = $(this);
|
||||||
loader.removeClass("hidden");
|
loader.removeClass("hidden");
|
||||||
var receiver = $("#receiver").val();
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"/",
|
url:"/",
|
||||||
type:"POST",
|
type:"POST",
|
||||||
data: $this.serialize()
|
data: $this.serialize()
|
||||||
}).done(function(data) {
|
}).done(function(data) {
|
||||||
grecaptcha.reset();
|
//grecaptcha.reset();
|
||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
loader.addClass("hidden");
|
loader.addClass("hidden");
|
||||||
console.log(data)
|
console.log(data)
|
||||||
|
@ -21,15 +21,15 @@ $(function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#receiver").val('');
|
$(".rec").val('');
|
||||||
loader.addClass("hidden");
|
loader.addClass("hidden");
|
||||||
swal("Success",
|
swal("Success",
|
||||||
`0.05 🌩ETH has been successfully transferred to <a href="https://explorer.lisinski.online/tx/${data.success.txHash}" target="blank">${receiver}</a>`,
|
`🌩ETH has been successfully transferred!`,
|
||||||
"success"
|
"success"
|
||||||
);
|
);
|
||||||
updateBalance();
|
updateBalance();
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
grecaptcha.reset();
|
//grecaptcha.reset();
|
||||||
console.log(err);
|
console.log(err);
|
||||||
loader.addClass("hidden");
|
loader.addClass("hidden");
|
||||||
});
|
});
|
||||||
|
|
|
@ -39,13 +39,13 @@ html
|
||||||
.card-header
|
.card-header
|
||||||
| Thundercloud faucet
|
| Thundercloud faucet
|
||||||
.card-body
|
.card-body
|
||||||
form#faucetForm(action='/' method='POST')
|
form#faucetForm.ff(action='/' method='POST')
|
||||||
.form-group
|
.form-group
|
||||||
.input-group
|
.input-group
|
||||||
span.input-group-prepend
|
span.input-group-prepend
|
||||||
span.input-group-text.bg-transparent.border-right-0
|
span.input-group-text.bg-transparent.border-right-0
|
||||||
i.fas.fa-wallet.fa-2x
|
i.fas.fa-wallet.fa-2x
|
||||||
input#receiver.form-control.form-control-lg.py-2.border-left-0.border(name='receiver' type='text' placeholder='Enter wallet address...')
|
input#receiver.rec.form-control.form-control-lg.py-2.border-left-0.border(name='receiver' type='text' placeholder='Enter wallet address...')
|
||||||
span.input-group-append
|
span.input-group-append
|
||||||
button.btn.btn-outline-secondary.border-left-0.border(type='button' data-toggle='popover' data-trigger='focus' title='Wallet Address' data-content='This address will get the Ether')
|
button.btn.btn-outline-secondary.border-left-0.border(type='button' data-toggle='popover' data-trigger='focus' title='Wallet Address' data-content='This address will get the Ether')
|
||||||
i.fas.fa-info
|
i.fas.fa-info
|
||||||
|
@ -74,13 +74,13 @@ html
|
||||||
.card-header
|
.card-header
|
||||||
| Thundercloud Faucet
|
| Thundercloud Faucet
|
||||||
.card-body
|
.card-body
|
||||||
form#faucetFormMin(action='/' method='POST')
|
form#faucetFormMin.ff(action='/' method='POST')
|
||||||
.form-group
|
.form-group
|
||||||
.input-group
|
.input-group
|
||||||
span.input-group-prepend
|
span.input-group-prepend
|
||||||
span.input-group-text.bg-transparent.border-right-0
|
span.input-group-text.bg-transparent.border-right-0
|
||||||
i.fas.fa-wallet.fa-2x
|
i.fas.fa-wallet.fa-2x
|
||||||
input#receiverMin.form-control.form-control-lg.py-2.border-left-0.border(name='receiver' type='text' placeholder='Enter wallet address...')
|
input#receiverMin.rec.form-control.form-control-lg.py-2.border-left-0.border(name='receiver' type='text' placeholder='Enter wallet address...')
|
||||||
span.input-group-append
|
span.input-group-append
|
||||||
button.btn.btn-outline-secondary.border-left-0.border(type='button' data-toggle='popover' data-trigger='focus' title='Wallet Address' data-content='This address will get the Ether.')
|
button.btn.btn-outline-secondary.border-left-0.border(type='button' data-toggle='popover' data-trigger='focus' title='Wallet Address' data-content='This address will get the Ether.')
|
||||||
i.fas.fa-info
|
i.fas.fa-info
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"ganache-cli": "^6.5.0"
|
"ganache-cli": "^6.5.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "rm -rf deploy/db/*",
|
"clean": "rm -rf deploy/db/* && rm -rf deploy/keys/*",
|
||||||
"faucet": "cd deploy/faucet && yarn start"
|
"faucet": "cd deploy/faucet && yarn start"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue