From 93caee3ca78788793398ae0e2bcc42a9115f8a74 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 21 Oct 2016 15:12:03 -0300 Subject: [PATCH] allow send when amount > 0 --- src/js/controllers/amount.js | 4 +++- www/views/amount.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 8b79bd815..e64f31d9c 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -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)); diff --git a/www/views/amount.html b/www/views/amount.html index f7ac13a7e..bafed47af 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -52,7 +52,7 @@
+ ng-show="allowSend" ng-click="finish()">