mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Overload getAllSortedFiatCurrencies() with Comparator param
The default method sorts by currency name, in come cases we need to sort by currency code, e.g., swift accounts. This method allows sorting by either.
This commit is contained in:
parent
e50cd42478
commit
a113b3ddfb
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,13 @@ public class CurrencyUtil {
|
|||
}
|
||||
|
||||
public static Collection<FiatCurrency> getAllSortedFiatCurrencies() {
|
||||
return fiatCurrencyMapSupplier.get().values();
|
||||
return fiatCurrencyMapSupplier.get().values(); // sorted by currency name
|
||||
}
|
||||
|
||||
public static Collection<FiatCurrency> getAllSortedFiatCurrencies(Comparator comparator) {
|
||||
return (List<FiatCurrency>) getAllSortedFiatCurrencies().stream()
|
||||
.sorted(comparator) // sorted by comparator param
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static Map<String, FiatCurrency> createFiatCurrencyMap() {
|
||||
|
|
Loading…
Add table
Reference in a new issue