mobile only - fix float point
This commit is contained in:
parent
141602a5ac
commit
16363562b1
5 changed files with 201 additions and 8 deletions
|
|
@ -40,11 +40,10 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
|
|||
};
|
||||
|
||||
$scope.pushDigit = function(digit) {
|
||||
var amount = $scope.showAlternativeAmount ? $scope.alternativeAmount : $scope.amount;
|
||||
|
||||
if (amount.toString().length >= 10) return;
|
||||
if (amount == 0 && digit == 0) return;
|
||||
var amount = $scope.showAlternativeAmount ? $scope.alternativeAmount.toString() : $scope.amount.toString();
|
||||
|
||||
if (amount.length >= 10) return;
|
||||
if (amount == '0' && digit == 0) return;
|
||||
var val = amount ? amount + digit : digit;
|
||||
processAmount(val);
|
||||
};
|
||||
|
|
@ -137,7 +136,7 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
|
|||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
if (result == 'Infinity') return null;
|
||||
if (result == 'Infinity' || lodash.isNaN(result)) return null;
|
||||
return result;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue