Merge pull request #646 from isocolsky/fix/send

Allow send when amount > 0
This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-21 16:51:09 -03:00 committed by GitHub
commit 2615027abd
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));

View File

@ -52,7 +52,7 @@
<div class="keypad">
<div class="row">
<div class="col col-25 col-offset-75 operator-send"
ng-show="amount > 0 || alternativeResult > 0 || amountResult > 0" ng-click="finish()">
ng-show="allowSend" ng-click="finish()">
<i class="icon ion-ios-arrow-thin-right"></i>
</div>
</div>