Remove unnecessary static import

This commit is contained in:
Christoph Atteneder 2019-04-19 10:53:44 +02:00
parent 55d09a308b
commit dadd22cc31
No known key found for this signature in database
GPG Key ID: CD5DC1C529CDFD3B

View File

@ -17,15 +17,13 @@
package bisq.desktop.util.validation;
import bisq.core.btc.wallet.Restrictions;
import bisq.core.locale.Res;
import bisq.core.payment.PaymentAccount;
import bisq.core.util.BSFormatter;
import javax.inject.Inject;
import static bisq.core.btc.wallet.Restrictions.getMaxBuyerSecurityDepositAsPercent;
import static bisq.core.btc.wallet.Restrictions.getMinBuyerSecurityDepositAsPercent;
public class SecurityDepositValidator extends NumberValidator {
private final BSFormatter formatter;
@ -61,7 +59,7 @@ public class SecurityDepositValidator extends NumberValidator {
private ValidationResult validateIfNotTooLowPercentageValue(String input) {
try {
double percentage = formatter.parsePercentStringToDouble(input);
double minPercentage = getMinBuyerSecurityDepositAsPercent(paymentAccount);
double minPercentage = Restrictions.getMinBuyerSecurityDepositAsPercent(paymentAccount);
if (percentage < minPercentage)
return new ValidationResult(false,
Res.get("validation.inputTooSmall", formatter.formatToPercentWithSymbol(minPercentage)));
@ -75,7 +73,7 @@ public class SecurityDepositValidator extends NumberValidator {
private ValidationResult validateIfNotTooHighPercentageValue(String input) {
try {
double percentage = formatter.parsePercentStringToDouble(input);
double maxPercentage = getMaxBuyerSecurityDepositAsPercent(paymentAccount);
double maxPercentage = Restrictions.getMaxBuyerSecurityDepositAsPercent(paymentAccount);
if (percentage > maxPercentage)
return new ValidationResult(false,
Res.get("validation.inputTooLarge", formatter.formatToPercentWithSymbol(maxPercentage)));