Merge pull request #5163 from JDonadio/ref/dead-currencies

Remove dead/unused currencies
This commit is contained in:
Gabriel Edgardo Bazán 2016-12-08 16:25:59 -03:00 committed by GitHub
commit b88a3db93a
1 changed files with 10 additions and 3 deletions

View File

@ -10,10 +10,17 @@ angular.module('copayApp.controllers').controller('preferencesAltCurrencyControl
$scope.currentCurrency = config.wallet.settings.alternativeIsoCode;
$scope.listComplete = false;
var unusedCurrencyList = [{
isoCode: 'LTL'
}, {
isoCode: 'BTC'
}];
var idx = lodash.indexBy(unusedCurrencyList, 'isoCode');
rateService.whenAvailable(function() {
completeAlternativeList = rateService.listAlternatives();
lodash.remove(completeAlternativeList, function(c) {
return c.isoCode == 'BTC';
completeAlternativeList = lodash.reject(rateService.listAlternatives(), function(c) {
return idx[c.isoCode];
});
$scope.altCurrencyList = completeAlternativeList.slice(0, next);
});