Improve formatting and simplify code

This commit is contained in:
Christoph Atteneder 2021-07-19 13:38:00 +02:00
parent f0258d6dd1
commit 4ae8ecaecb
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B
2 changed files with 9 additions and 5 deletions

View File

@ -56,8 +56,13 @@ public class CapitualForm extends PaymentMethodForm {
return gridRow;
}
public CapitualForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, CapitualValidator capitualValidator,
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
public CapitualForm(PaymentAccount paymentAccount,
AccountAgeWitnessService accountAgeWitnessService,
CapitualValidator capitualValidator,
InputValidator inputValidator,
GridPane gridPane,
int gridRow,
CoinFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.capitualAccount = (CapitualAccount) paymentAccount;
this.capitualValidator = capitualValidator;

View File

@ -7,7 +7,7 @@ import bisq.core.util.validation.RegexValidator;
import javax.inject.Inject;
public class CapitualValidator extends InputValidator {
private RegexValidator regexValidator;
private final RegexValidator regexValidator;
@Inject
public CapitualValidator(RegexValidator regexValidator) {
@ -18,8 +18,7 @@ public class CapitualValidator extends InputValidator {
@Override
public ValidationResult validate(String input) {
ValidationResult result = regexValidator.validate(input);
return result;
return regexValidator.validate(input);
}
}