From 21073a5ffe5b4f06caa2ec73ec6b2c912fdea7cf Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 1 Sep 2014 15:25:19 -0300 Subject: [PATCH] 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;