Skip to content

Commit

Permalink
removed auto reload wallet feature. users must click or interact with…
Browse files Browse the repository at this point in the history
… the page. attempt to save on bandwidth.
  • Loading branch information
root committed Jun 3, 2020
1 parent 35de422 commit 06cf50a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 24 deletions.
35 changes: 13 additions & 22 deletions js/coinbin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ $(document).ready(function() {
$("#openWallet").removeClass("hidden").show();

walletBalance();
checkBalanceLoop();
} else {
$("#openLoginStatus").html("Your passwords do not match!").removeClass("hidden").fadeOut().fadeIn();
}
Expand Down Expand Up @@ -133,7 +132,7 @@ $(document).ready(function() {
$("#walletSpend").removeClass("hidden").addClass("hidden");
});

$("#walletBalance").click(function(){
$("#walletBalance, #walletAddress, #walletQrCode").click(function(){
walletBalance();
});

Expand Down Expand Up @@ -297,28 +296,20 @@ $(document).ready(function() {
});

function walletBalance(){
var tx = coinjs.transaction();
$("#walletLoader").removeClass("hidden");
coinjs.addressBalance($("#walletAddress").html(),function(data){
if($(data).find("result").text()==1){
var v = $(data).find("balance").text()/100000000;
$("#walletBalance").html(v+" BTC").attr('rel',v).fadeOut().fadeIn();
} else {
if($("#walletLoader").hasClass("hidden")){
var tx = coinjs.transaction();
$("#walletLoader").removeClass("hidden");
coinjs.addressBalance($("#walletAddress").html(),function(data){
if($(data).find("result").text()==1){
var v = $(data).find("balance").text()/100000000;
$("#walletBalance").html(v+" BTC").attr('rel',v).fadeOut().fadeIn();
} else {
$("#walletBalance").html("0.00 BTC").attr('rel',v).fadeOut().fadeIn();
}

$("#walletLoader").addClass("hidden");
});
}
}

function checkBalanceLoop(){
clearTimeout(wallet_timer);
wallet_timer = setTimeout(function(){
if($("#walletLoader").hasClass("hidden")){
walletBalance();
}
checkBalanceLoop();
},45000);
$("#walletLoader").addClass("hidden");
});
}
}

/* new -> address code */
Expand Down
4 changes: 2 additions & 2 deletions sha1sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---- Version 1.5 2020.04.22 ----
---- Version 1.5 2020.06.03 ----
77e4519962e2f6a9fc93342137dbb31c33b76b04 ./js/aes.js
3a09a8fc0cfe828b57fc798d668234d0490ee1a6 ./js/bootstrap-datetimepicker.min.js
253711c6d825de55a8360552573be950da180614 ./js/bootstrap.min.js
17cc6a56ee601fbe3858563f26232f64ce12abcb ./js/coinbin.js
7708a3771dd2749807f2bfc41af407b68888ae5d ./js/coinbin.js
101544b32de9b5637edd38ea0da462bb25bab29a ./js/coin.js
988565bc2cb402d63ed5c5fd7ff47c4278efc2c5 ./js/collapse.js
9ba5ede3d7f9d4c8fd623395f196adfdcf7e970f ./js/crypto-min.js
Expand Down

0 comments on commit 06cf50a

Please sign in to comment.