Fix units. Ref formatAmount
This commit is contained in:
parent
4329142a2b
commit
7d9f7d9303
2 changed files with 9 additions and 9 deletions
|
|
@ -50,7 +50,7 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
||||||
$scope.latestWithBalance = lodash.slice(withBalance, 0, BALANCE_ADDRESS_LIMIT);
|
$scope.latestWithBalance = lodash.slice(withBalance, 0, BALANCE_ADDRESS_LIMIT);
|
||||||
|
|
||||||
lodash.each(withBalance, function(a) {
|
lodash.each(withBalance, function(a) {
|
||||||
a.balanceStr = txFormatService.formatAmount(a.amount);
|
a.balanceStr = txFormatService.formatAmountStr($scope.wallet.coin, a.amount);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.viewAll = {
|
$scope.viewAll = {
|
||||||
|
|
|
||||||
|
|
@ -215,11 +215,11 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
cache.satToUnit = 1 / cache.unitToSatoshi;
|
cache.satToUnit = 1 / cache.unitToSatoshi;
|
||||||
|
|
||||||
//STR
|
//STR
|
||||||
cache.totalBalanceStr = txFormatService.formatAmount(cache.totalBalanceSat) + ' ' + (wallet.coin).toUpperCase();
|
cache.totalBalanceStr = txFormatService.formatAmountStr(wallet.coin, cache.totalBalanceSat);
|
||||||
cache.lockedBalanceStr = txFormatService.formatAmount(cache.lockedBalanceSat) + ' ' + (wallet.coin).toUpperCase();
|
cache.lockedBalanceStr = txFormatService.formatAmountStr(wallet.coin, cache.lockedBalanceSat);
|
||||||
cache.availableBalanceStr = txFormatService.formatAmount(cache.availableBalanceSat) + ' ' + (wallet.coin).toUpperCase();
|
cache.availableBalanceStr = txFormatService.formatAmountStr(wallet.coin, cache.availableBalanceSat);
|
||||||
cache.spendableBalanceStr = txFormatService.formatAmount(cache.spendableAmount) + ' ' + (wallet.coin).toUpperCase();
|
cache.spendableBalanceStr = txFormatService.formatAmountStr(wallet.coin, cache.spendableAmount);
|
||||||
cache.pendingBalanceStr = txFormatService.formatAmount(cache.pendingAmount) + ' ' + (wallet.coin).toUpperCase();
|
cache.pendingBalanceStr = txFormatService.formatAmountStr(wallet.coin, cache.pendingAmount);
|
||||||
|
|
||||||
cache.alternativeName = config.settings.alternativeName;
|
cache.alternativeName = config.settings.alternativeName;
|
||||||
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
|
cache.alternativeIsoCode = config.settings.alternativeIsoCode;
|
||||||
|
|
@ -416,10 +416,10 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
||||||
|
|
||||||
if (cacheCoin == 'bits') {
|
if (cacheCoin == 'bits') {
|
||||||
|
|
||||||
$log.debug('Fixing Tx Cache Unit to: ' + 'btc')
|
$log.debug('Fixing Tx Cache Unit to: ' + wallet.coin)
|
||||||
lodash.each(txs, function(tx) {
|
lodash.each(txs, function(tx) {
|
||||||
tx.amountStr = txFormatService.formatAmountStr('BTC', tx.amount);
|
tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount);
|
||||||
tx.feeStr = txFormatService.formatAmountStr('BTC', tx.fees);
|
tx.feeStr = txFormatService.formatAmountStr(wallet.coin, tx.fees);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue