wallet-balance directive uses formatted-amount.
This commit is contained in:
parent
d7285a72e4
commit
82c0746ff8
3 changed files with 6 additions and 4 deletions
|
|
@ -65,19 +65,21 @@
|
|||
}
|
||||
|
||||
function formatBalance() {
|
||||
var displayAsFiat = $scope.displayAsFiat === 'true';
|
||||
var wallet = null;
|
||||
try {
|
||||
wallet = JSON.parse($scope.wallet);
|
||||
} catch (e) {
|
||||
$log.error('Error parsing wallet to display balance.', e);
|
||||
setDisplay('', '');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$scope.displayAsFiat || $scope.displayAsFiat && !cryptoBalanceHasBeenDisplayed) {
|
||||
if (!displayAsFiat || displayAsFiat && !cryptoBalanceHasBeenDisplayed) {
|
||||
displayCryptoBalance(wallet);
|
||||
}
|
||||
|
||||
if ($scope.displayAsFiat) {
|
||||
if (displayAsFiat) {
|
||||
displayFiatBalance(wallet);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue