allow send when amount > 0

This commit is contained in:
Ivan Socolsky 2016-10-21 15:12:03 -03:00
commit 93caee3ca7
No known key found for this signature in database
GPG key ID: FAECE6A05FAA4F56
2 changed files with 4 additions and 2 deletions

View file

@ -133,6 +133,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.resetAmount = function() {
$scope.amount = $scope.alternativeResult = $scope.amountResult = $scope.globalResult = '';
$scope.allowSend = false;
checkFontSize();
};
@ -144,7 +146,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var formatedValue = format(val);
var result = evaluate(formatedValue);
$scope.allowSend = lodash.isNumber(result) && +result > 0;
if (lodash.isNumber(result)) {
$scope.globalResult = isExpression(val) ? '= ' + processResult(result) : '';
$scope.amountResult = $filter('formatFiatAmount')(toFiat(result));