Fix in formatted-amount of display of subcent fees in transactions details page.
This commit is contained in:
parent
84fd483f19
commit
80c9d682b5
1 changed files with 11 additions and 2 deletions
|
|
@ -86,15 +86,24 @@
|
|||
}
|
||||
|
||||
function formatNumbers() {
|
||||
console.log('formatNumbers() "' + $scope.value + '", "' + $scope.currency + '"');
|
||||
// Might get "< 0.01 USD" being passed in.
|
||||
// During watch, may be changed from having a separate currency value,
|
||||
// to both being in value. Don't want to use previous currency value.
|
||||
// Try to extract currency from value..
|
||||
var currencySplit = $scope.value.split(" ");
|
||||
if (currencySplit.length === 2 && !$scope.currency) {
|
||||
$scope.currency = currencySplit[1];
|
||||
if (currencySplit.length >= 2 && !$scope.currency) {
|
||||
$scope.currency = currencySplit[currencySplit.length - 1];
|
||||
}
|
||||
$scope.currency = $scope.currency || '';
|
||||
|
||||
// Redo this when we have proper formatting for low fees
|
||||
if ($scope.value.indexOf("<") === 0) {
|
||||
buildAmount($scope.value, '', '');
|
||||
$scope.currency = '';
|
||||
$scope.canShow = true;
|
||||
return;
|
||||
}
|
||||
|
||||
var parsed = parseFloat($scope.value);
|
||||
var valueFormatted = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue