mirror of https://github.com/BTCPrivate/copay.git
amount input: wrong message when typing some chars
This commit is contained in:
parent
e73a3f8160
commit
21073a5ffe
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue