mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5163 from JDonadio/ref/dead-currencies
Remove dead/unused currencies
This commit is contained in:
commit
b88a3db93a
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue