From 06cf50abb370b5e9ebbfc32fab05e970fe1f1a76 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 3 Jun 2020 17:59:47 +0000 Subject: [PATCH] removed auto reload wallet feature. users must click or interact with the page. attempt to save on bandwidth. --- js/coinbin.js | 35 +++++++++++++---------------------- sha1sum | 4 ++-- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index ede27692..91ac6002 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -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(); } @@ -133,7 +132,7 @@ $(document).ready(function() { $("#walletSpend").removeClass("hidden").addClass("hidden"); }); - $("#walletBalance").click(function(){ + $("#walletBalance, #walletAddress, #walletQrCode").click(function(){ walletBalance(); }); @@ -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 */ diff --git a/sha1sum b/sha1sum index a4521e29..ecb69ea6 100644 --- a/sha1sum +++ b/sha1sum @@ -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