From 21073a5ffe5b4f06caa2ec73ec6b2c912fdea7cf Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 1 Sep 2014 15:25:19 -0300 Subject: [PATCH 1/2] amount input: wrong message when typing some chars --- js/directives.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/directives.js b/js/directives.js index f3fec639a..5061580b7 100644 --- a/js/directives.js +++ b/js/directives.js @@ -45,9 +45,10 @@ angular.module('copayApp.directives') link: function(scope, element, attrs, ctrl) { var val = function(value) { var availableBalanceNum = Number(($rootScope.availableBalance * config.unitToSatoshi).toFixed(0)); - var vNum = Number((value * config.unitToSatoshi).toFixed(0)) + feeSat; + var vNum = Number((value * config.unitToSatoshi).toFixed(0)); if (typeof vNum == "number" && vNum > 0) { + vNum = vNum + feeSat; if (availableBalanceNum < vNum || isNaN(availableBalanceNum)) { ctrl.$setValidity('enoughAmount', false); scope.notEnoughAmount = true; From 7cae6b3a2e6532e9b3b14564e4318bc935f0b7b1 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 1 Sep 2014 15:41:17 -0300 Subject: [PATCH 2/2] Alternative amount should not have enought-amount directive --- views/send.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/send.html b/views/send.html index a99d4b95a..cae16e3b9 100644 --- a/views/send.html +++ b/views/send.html @@ -90,7 +90,7 @@