mirror of https://github.com/BTCPrivate/copay.git
avoid computing alternative currency rate when no txs in history
This commit is contained in:
parent
d511103081
commit
120fcafeda
|
@ -85,6 +85,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
tx.amount = $filter('noFractionNumber')(tx.amount);
|
||||
});
|
||||
|
||||
if (items.length > 0) {
|
||||
var index = _.indexBy(items, 'rateTs');
|
||||
rateService.getHistoricRates(w.settings.alternativeIsoCode, _.keys(index), function(err, res) {
|
||||
if (!err && res) {
|
||||
|
@ -98,6 +99,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
|
|||
}, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$scope.blockchain_txs = w.cached_txs = items;
|
||||
$scope.nbPages = res.nbPages;
|
||||
|
|
Loading…
Reference in New Issue