From f4c2b3d42535a6c8f4ee14ee115154edbce073b4 Mon Sep 17 00:00:00 2001 From: OutCast3k Date: Wed, 21 Dec 2016 11:56:18 +0000 Subject: [PATCH] updated coinbin.js fixed a small bug in the #wallet section of coinb.in --- js/coinbin.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/coinbin.js b/js/coinbin.js index 0e6565d..557bd01 100644 --- a/js/coinbin.js +++ b/js/coinbin.js @@ -108,8 +108,10 @@ $(document).ready(function() { thisbtn.attr('disabled',true); tx.addUnspent($("#walletAddress").html(), function(data){ - var dvalue = (data.value/100000000).toFixed(8); - total = total.toFixed(8); + + var dvalue = (data.value/100000000).toFixed(8) * 1; + total = (total*1).toFixed(8) * 1; + if(dvalue>=total){ var change = dvalue-total; if((change*1)>0){ @@ -139,7 +141,7 @@ $(document).ready(function() { }, signed); } else { - $("#walletSendConfirmStatus").removeClass("hidden").addClass('alert-danger').html("You have a confirmed balance of "+data.value+" BTC unable to send "+total+" BTC").fadeOut().fadeIn(); + $("#walletSendConfirmStatus").removeClass("hidden").addClass('alert-danger').html("You have a confirmed balance of "+dvalue+" BTC unable to send "+total+" BTC").fadeOut().fadeIn(); thisbtn.attr('disabled',false); }