mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Remove static methods from Validator
This commit is contained in:
parent
f2b5d7670f
commit
46863bb4c2
@ -169,8 +169,7 @@ public class MainModel extends UIModel {
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void onFacadesInitialised() {
|
||||
// TODO Check this: never called on regtest
|
||||
// Consider to use version from Mike Hearn
|
||||
// TODO Consider to use version from Mike Hearn
|
||||
walletFacade.addDownloadListener(new WalletFacade.DownloadListener() {
|
||||
@Override
|
||||
public void progress(double percent) {
|
||||
|
@ -163,7 +163,7 @@ public class RegistrationViewCB extends CachedViewCB<RegistrationPM> implements
|
||||
@Override
|
||||
public void useSettingsContext(boolean useSettingsContext) {
|
||||
if (useSettingsContext) {
|
||||
// TODO
|
||||
// TODO not impl. yet
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,8 +28,6 @@ import javax.inject.Inject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
//TODO convert to non static
|
||||
|
||||
/**
|
||||
* FiatNumberValidator for validating fiat values.
|
||||
* <p>
|
||||
@ -41,13 +39,9 @@ public final class FiatValidator extends NumberValidator {
|
||||
//TODO Find appropriate values - depends on currencies
|
||||
public static final double MIN_FIAT_VALUE = 0.01; // usually a cent is the smallest currency unit
|
||||
public static final double MAX_FIAT_VALUE = 1000000;
|
||||
private static String currencyCode = "Fiat";
|
||||
private String currencyCode = "Fiat";
|
||||
|
||||
|
||||
public static void setFiatCurrencyCode(String currencyCode) {
|
||||
FiatValidator.currencyCode = currencyCode;
|
||||
}
|
||||
|
||||
@Inject
|
||||
public FiatValidator(User user) {
|
||||
if (user != null) {
|
||||
@ -85,6 +79,15 @@ public final class FiatValidator extends NumberValidator {
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Setter
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public void setFiatCurrencyCode(String currencyCode) {
|
||||
this.currencyCode = currencyCode;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Private methods
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user