Merge pull request #4672 from JDonadio/bug/format-amount
Fix format amount
This commit is contained in:
commit
0f425e0346
1 changed files with 3 additions and 2 deletions
|
|
@ -140,8 +140,9 @@ angular.module('copayApp.controllers').controller('inputAmountController', funct
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.finish = function() {
|
$scope.finish = function() {
|
||||||
var amount = $scope.showAlternativeAmount ? fromFiat(evaluate(format($scope.amount))).toFixed(unitDecimals) : evaluate(format($scope.amount));
|
var _amount = evaluate(format($scope.amount));
|
||||||
var alternativeAmount = $scope.showAlternativeAmount ? evaluate(format($scope.amount)) : toFiat(evaluate(format($scope.amount)));
|
var amount = $scope.showAlternativeAmount ? fromFiat(_amount).toFixed(unitDecimals) : _amount.toFixed(unitDecimals);
|
||||||
|
var alternativeAmount = $scope.showAlternativeAmount ? _amount : toFiat(_amount);
|
||||||
|
|
||||||
if (amount % 1 == 0) amount = parseInt(amount);
|
if (amount % 1 == 0) amount = parseInt(amount);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue