Merge pull request #2 from Swader/master

Fixed contract generation and deposits. Improved faucet. Fixed determ…
This commit is contained in:
Bruno Škvorc 2019-07-31 06:43:55 +02:00 committed by GitHub
commit 52516d647d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 84 additions and 41 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -2,17 +2,17 @@ $(function() {
var loader = $(".loading-container");
updateBalance();
// on form submit
$( "#faucetForm" ).submit(function( e ) {
$( ".ff" ).submit(function( e ) {
e.preventDefault();
$this = $(this);
loader.removeClass("hidden");
var receiver = $("#receiver").val();
$.ajax({
url:"/",
type:"POST",
data: $this.serialize()
}).done(function(data) {
grecaptcha.reset();
//grecaptcha.reset();
if (!data.success) {
loader.addClass("hidden");
console.log(data)
@ -21,15 +21,15 @@ $(function() {
return;
}
$("#receiver").val('');
$(".rec").val('');
loader.addClass("hidden");
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"
);
updateBalance();
}).fail(function(err) {
grecaptcha.reset();
//grecaptcha.reset();
console.log(err);
loader.addClass("hidden");
});

View File

@ -39,13 +39,13 @@ html
.card-header
| Thundercloud faucet
.card-body
form#faucetForm(action='/' method='POST')
form#faucetForm.ff(action='/' method='POST')
.form-group
.input-group
span.input-group-prepend
span.input-group-text.bg-transparent.border-right-0
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
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
@ -74,13 +74,13 @@ html
.card-header
| Thundercloud Faucet
.card-body
form#faucetFormMin(action='/' method='POST')
form#faucetFormMin.ff(action='/' method='POST')
.form-group
.input-group
span.input-group-prepend
span.input-group-text.bg-transparent.border-right-0
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
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

View File

@ -13,7 +13,7 @@
"ganache-cli": "^6.5.0"
},
"scripts": {
"clean": "rm -rf deploy/db/*",
"clean": "rm -rf deploy/db/* && rm -rf deploy/keys/*",
"faucet": "cd deploy/faucet && yarn start"
}
}

File diff suppressed because one or more lines are too long