Merge pull request #333 from jamal-jackson/feature/minor_amount_view_fixes
limits one decimal in amount value, stops user from going past 2 deci…
This commit is contained in:
commit
6f704aede2
1 changed files with 2 additions and 0 deletions
|
|
@ -92,6 +92,8 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
|||
|
||||
$scope.pushDigit = function(digit) {
|
||||
if ($scope.amount && $scope.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
|
||||
if ($scope.amount.indexOf('.') > -1 && digit == '.') return;
|
||||
if($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
|
||||
|
||||
$scope.amount = ($scope.amount + digit).replace('..', '.');
|
||||
checkFontSize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue