mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Improve formatting and simplify code
This commit is contained in:
parent
f0258d6dd1
commit
4ae8ecaecb
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user