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