Add review feedbacks from KaiWitt

This commit is contained in:
BtcContributor 2021-06-14 16:37:09 +02:00 committed by Christoph Atteneder
parent b47646b0e2
commit e3fbc97fbc
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
2 changed files with 4 additions and 6 deletions

View file

@ -349,14 +349,12 @@ public class CurrencyUtil {
} }
public static List<TradeCurrency> getAllCapitualCurrencies() { public static List<TradeCurrency> getAllCapitualCurrencies() {
List<TradeCurrency> currencies = new ArrayList<>(Arrays.asList( return new ArrayList<>(Arrays.asList(
new FiatCurrency("EUR"),
new FiatCurrency("BRL"), new FiatCurrency("BRL"),
new FiatCurrency("EUR"),
new FiatCurrency("GBP"), new FiatCurrency("GBP"),
new FiatCurrency("USD") new FiatCurrency("USD")
)); ));
currencies.sort(Comparator.comparing(TradeCurrency::getCode));
return currencies;
} }
// https://www.revolut.com/help/getting-started/exchanging-currencies/what-fiat-currencies-are-supported-for-holding-and-exchange // https://www.revolut.com/help/getting-started/exchanging-currencies/what-fiat-currencies-are-supported-for-holding-and-exchange

View file

@ -89,7 +89,7 @@ public class CapitualForm extends PaymentMethodForm {
else else
flowPane.setId("flow-pane-checkboxes-non-editable-bg"); flowPane.setId("flow-pane-checkboxes-non-editable-bg");
CurrencyUtil.getAllCapitualCurrencies().stream().forEach(e -> CurrencyUtil.getAllCapitualCurrencies().forEach(e ->
fillUpFlowPaneWithCurrencies(isEditable, flowPane, e, capitualAccount)); fillUpFlowPaneWithCurrencies(isEditable, flowPane, e, capitualAccount));
} }
@ -120,7 +120,7 @@ public class CapitualForm extends PaymentMethodForm {
public void updateAllInputsValid() { public void updateAllInputsValid() {
allInputsValid.set(isAccountNameValid() allInputsValid.set(isAccountNameValid()
&& capitualValidator.validate(capitualAccount.getAccountNr()).isValid && capitualValidator.validate(capitualAccount.getAccountNr()).isValid
&& capitualAccount.getTradeCurrencies().size() > 0); && !capitualAccount.getTradeCurrencies().isEmpty());
} }
} }