mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Refactor AutoConfirmSettings handling in preferences
- Do not use immutability for AutoConfirmSettings as it makes setting values cumbersome. - Add btc validator for trade limit - Make AutoConfirmSettings an optional and add find method by currency code to be better prepared when used for other coins. - Add static getDefaultForXmr to AutoConfirmSettings - Move listener creation to init method
This commit is contained in:
parent
580b05968f
commit
512f1a5972
5 changed files with 130 additions and 106 deletions
|
@ -21,21 +21,37 @@ import bisq.common.proto.persistable.PersistablePayload;
|
||||||
|
|
||||||
import com.google.protobuf.Message;
|
import com.google.protobuf.Message;
|
||||||
|
|
||||||
|
import org.bitcoinj.core.Coin;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public final class AutoConfirmSettings implements PersistablePayload {
|
import lombok.Getter;
|
||||||
public final boolean enabled;
|
import lombok.Setter;
|
||||||
public final int requiredConfirmations;
|
|
||||||
public final long tradeLimit;
|
|
||||||
public final List<String> serviceAddresses;
|
|
||||||
public final String currencyCode;
|
|
||||||
|
|
||||||
public AutoConfirmSettings(boolean enabled,
|
@Getter
|
||||||
int requiredConfirmations,
|
@Setter
|
||||||
long tradeLimit,
|
public final class AutoConfirmSettings implements PersistablePayload {
|
||||||
List<String> serviceAddresses,
|
private boolean enabled;
|
||||||
String currencyCode) {
|
private int requiredConfirmations;
|
||||||
|
private long tradeLimit;
|
||||||
|
private List<String> serviceAddresses;
|
||||||
|
private String currencyCode;
|
||||||
|
|
||||||
|
public static AutoConfirmSettings getDefaultForXmr(List<String> serviceAddresses) {
|
||||||
|
return new AutoConfirmSettings(
|
||||||
|
false,
|
||||||
|
5,
|
||||||
|
Coin.COIN.value,
|
||||||
|
serviceAddresses,
|
||||||
|
"XMR");
|
||||||
|
}
|
||||||
|
|
||||||
|
AutoConfirmSettings(boolean enabled,
|
||||||
|
int requiredConfirmations,
|
||||||
|
long tradeLimit,
|
||||||
|
List<String> serviceAddresses,
|
||||||
|
String currencyCode) {
|
||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
this.requiredConfirmations = requiredConfirmations;
|
this.requiredConfirmations = requiredConfirmations;
|
||||||
this.tradeLimit = tradeLimit;
|
this.tradeLimit = tradeLimit;
|
||||||
|
|
|
@ -40,8 +40,6 @@ import bisq.common.proto.persistable.PersistedDataHost;
|
||||||
import bisq.common.storage.Storage;
|
import bisq.common.storage.Storage;
|
||||||
import bisq.common.util.Utilities;
|
import bisq.common.util.Utilities;
|
||||||
|
|
||||||
import org.bitcoinj.core.Coin;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
@ -62,6 +60,7 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -321,6 +320,10 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||||
setUsePriceNotifications(true);
|
setUsePriceNotifications(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prefPayload.getAutoConfirmSettingsList().isEmpty()) {
|
||||||
|
prefPayload.getAutoConfirmSettingsList().add(AutoConfirmSettings.getDefaultForXmr(getDefaultXmrProofProviders()));
|
||||||
|
}
|
||||||
|
|
||||||
// We set the capability in CoreNetworkCapabilities if the program argument is set.
|
// We set the capability in CoreNetworkCapabilities if the program argument is set.
|
||||||
// If we have set it in the preferences view we handle it here.
|
// If we have set it in the preferences view we handle it here.
|
||||||
CoreNetworkCapabilities.maybeApplyDaoFullMode(config);
|
CoreNetworkCapabilities.maybeApplyDaoFullMode(config);
|
||||||
|
@ -410,33 +413,38 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
|
||||||
persist();
|
persist();
|
||||||
}
|
}
|
||||||
|
|
||||||
// AutoConfirmSettings is currently only used for XMR. Although it could
|
public Optional<AutoConfirmSettings> findAutoConfirmSettings(String currencyCode) {
|
||||||
// potentially in the future be used for others too. In the interest of flexibility
|
return prefPayload.getAutoConfirmSettingsList().stream()
|
||||||
// we store it as a list in the proto definition, but in practical terms the
|
.filter(e -> e.getCurrencyCode().equals(currencyCode))
|
||||||
// application is not coded to handle more than one entry. For now this API
|
.findAny();
|
||||||
// to get/set AutoConfirmSettings is the gatekeeper. If in the future we adapt
|
|
||||||
// the application to manage more than one altcoin AutoConfirmSettings then
|
|
||||||
// this API will need to incorporate lookup by coin.
|
|
||||||
public AutoConfirmSettings getAutoConfirmSettings() {
|
|
||||||
if (prefPayload.getAutoConfirmSettingsList().size() == 0) {
|
|
||||||
// default values for AutoConfirmSettings when persisted payload is empty:
|
|
||||||
prefPayload.getAutoConfirmSettingsList().add(new AutoConfirmSettings(
|
|
||||||
false, 5, Coin.COIN.value, getDefaultXmrProofProviders(), "XMR"));
|
|
||||||
}
|
|
||||||
return prefPayload.getAutoConfirmSettingsList().get(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAutoConfirmSettings(AutoConfirmSettings autoConfirmSettings) {
|
public void setAutoConfServiceAddresses(String currencyCode, List<String> serviceAddresses) {
|
||||||
// see above comment regarding only one entry in this list currently
|
findAutoConfirmSettings(currencyCode).ifPresent(e -> {
|
||||||
prefPayload.getAutoConfirmSettingsList().clear();
|
e.setServiceAddresses(serviceAddresses);
|
||||||
prefPayload.getAutoConfirmSettingsList().add(autoConfirmSettings);
|
persist();
|
||||||
persist();
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAutoConfServiceAddresses(List<String> serviceAddresses) {
|
public void setAutoConfEnabled(String currencyCode, boolean enabled) {
|
||||||
AutoConfirmSettings x = this.getAutoConfirmSettings();
|
findAutoConfirmSettings(currencyCode).ifPresent(e -> {
|
||||||
this.setAutoConfirmSettings(new AutoConfirmSettings(
|
e.setEnabled(enabled);
|
||||||
x.enabled, x.requiredConfirmations, x.tradeLimit, serviceAddresses, x.currencyCode));
|
persist();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoConfRequiredConfirmations(String currencyCode, int requiredConfirmations) {
|
||||||
|
findAutoConfirmSettings(currencyCode).ifPresent(e -> {
|
||||||
|
e.setRequiredConfirmations(requiredConfirmations);
|
||||||
|
persist();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoConfTradeLimit(String currencyCode, long tradeLimit) {
|
||||||
|
findAutoConfirmSettings(currencyCode).ifPresent(e -> {
|
||||||
|
e.setTradeLimit(tradeLimit);
|
||||||
|
persist();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void persist() {
|
private void persist() {
|
||||||
|
|
|
@ -32,6 +32,11 @@ public class IntegerValidator extends InputValidator {
|
||||||
public IntegerValidator() {
|
public IntegerValidator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IntegerValidator(int minValue, int maxValue) {
|
||||||
|
this.minValue = minValue;
|
||||||
|
this.maxValue = maxValue;
|
||||||
|
}
|
||||||
|
|
||||||
public ValidationResult validate(String input) {
|
public ValidationResult validate(String input) {
|
||||||
ValidationResult validationResult = super.validate(input);
|
ValidationResult validationResult = super.validate(input);
|
||||||
if (!validationResult.isValid)
|
if (!validationResult.isValid)
|
||||||
|
|
|
@ -29,6 +29,7 @@ import bisq.desktop.main.overlays.popups.Popup;
|
||||||
import bisq.desktop.util.GUIUtil;
|
import bisq.desktop.util.GUIUtil;
|
||||||
import bisq.desktop.util.ImageUtil;
|
import bisq.desktop.util.ImageUtil;
|
||||||
import bisq.desktop.util.Layout;
|
import bisq.desktop.util.Layout;
|
||||||
|
import bisq.desktop.util.validation.BtcValidator;
|
||||||
import bisq.desktop.util.validation.RegexValidator;
|
import bisq.desktop.util.validation.RegexValidator;
|
||||||
|
|
||||||
import bisq.core.btc.wallet.Restrictions;
|
import bisq.core.btc.wallet.Restrictions;
|
||||||
|
@ -44,7 +45,6 @@ import bisq.core.locale.LanguageUtil;
|
||||||
import bisq.core.locale.Res;
|
import bisq.core.locale.Res;
|
||||||
import bisq.core.locale.TradeCurrency;
|
import bisq.core.locale.TradeCurrency;
|
||||||
import bisq.core.provider.fee.FeeService;
|
import bisq.core.provider.fee.FeeService;
|
||||||
import bisq.core.user.AutoConfirmSettings;
|
|
||||||
import bisq.core.user.BlockChainExplorer;
|
import bisq.core.user.BlockChainExplorer;
|
||||||
import bisq.core.user.Preferences;
|
import bisq.core.user.Preferences;
|
||||||
import bisq.core.util.FormattingUtils;
|
import bisq.core.util.FormattingUtils;
|
||||||
|
@ -111,12 +111,12 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
private ComboBox<TradeCurrency> preferredTradeCurrencyComboBox;
|
private ComboBox<TradeCurrency> preferredTradeCurrencyComboBox;
|
||||||
|
|
||||||
private ToggleButton showOwnOffersInOfferBook, useAnimations, useDarkMode, sortMarketCurrenciesNumerically,
|
private ToggleButton showOwnOffersInOfferBook, useAnimations, useDarkMode, sortMarketCurrenciesNumerically,
|
||||||
avoidStandbyMode, useCustomFee, autoConfirmXmr;
|
avoidStandbyMode, useCustomFee, autoConfirmXmrToggle;
|
||||||
private int gridRow = 0;
|
private int gridRow = 0;
|
||||||
private int displayCurrenciesGridRowIndex = 0;
|
private int displayCurrenciesGridRowIndex = 0;
|
||||||
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, ignoreDustThresholdInputTextField,
|
private InputTextField transactionFeeInputTextField, ignoreTradersListInputTextField, ignoreDustThresholdInputTextField,
|
||||||
autoConfRequiredConfirmations, autoConfServiceAddress, autoConfTradeLimit, /*referralIdInputTextField,*/
|
autoConfRequiredConfirmationsTf, autoConfServiceAddressTf, autoConfTradeLimitTf, /*referralIdInputTextField,*/
|
||||||
rpcUserTextField, blockNotifyPortTextField;
|
rpcUserTextField, blockNotifyPortTextField;
|
||||||
private ToggleButton isDaoFullNodeToggleButton;
|
private ToggleButton isDaoFullNodeToggleButton;
|
||||||
private PasswordTextField rpcPwTextField;
|
private PasswordTextField rpcPwTextField;
|
||||||
private TitledGroupBg daoOptionsTitledGroupBg;
|
private TitledGroupBg daoOptionsTitledGroupBg;
|
||||||
|
@ -656,19 +656,52 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
root.add(subGrid, 2, displayCurrenciesGridRowIndex, 2, 10);
|
root.add(subGrid, 2, displayCurrenciesGridRowIndex, 2, 10);
|
||||||
addTitledGroupBg(subGrid, 0, 4, Res.get("setting.preferences.autoConfirmXMR"), 0);
|
addTitledGroupBg(subGrid, 0, 4, Res.get("setting.preferences.autoConfirmXMR"), 0);
|
||||||
int localRowIndex = 0;
|
int localRowIndex = 0;
|
||||||
autoConfirmXmr = addSlideToggleButton(subGrid, localRowIndex, Res.get("setting.preferences.autoConfirmEnabled"), Layout.FIRST_ROW_DISTANCE);
|
autoConfirmXmrToggle = addSlideToggleButton(subGrid, localRowIndex, Res.get("setting.preferences.autoConfirmEnabled"), Layout.FIRST_ROW_DISTANCE);
|
||||||
autoConfRequiredConfirmations = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmRequiredConfirmations"));
|
|
||||||
autoConfTradeLimit = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmMaxTradeSize"));
|
autoConfRequiredConfirmationsTf = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmRequiredConfirmations"));
|
||||||
autoConfServiceAddress = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmServiceAddresses"));
|
autoConfRequiredConfirmationsTf.setValidator(new IntegerValidator(0, 1000));
|
||||||
GridPane.setHgrow(autoConfServiceAddress, Priority.ALWAYS);
|
|
||||||
|
autoConfTradeLimitTf = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmMaxTradeSize"));
|
||||||
|
autoConfTradeLimitTf.setValidator(new BtcValidator(formatter));
|
||||||
|
|
||||||
|
autoConfServiceAddressTf = addInputTextField(subGrid, ++localRowIndex, Res.get("setting.preferences.autoConfirmServiceAddresses"));
|
||||||
|
autoConfServiceAddressTf.setValidator(GUIUtil.addressRegexValidator());
|
||||||
|
autoConfServiceAddressTf.setErrorMessage(Res.get("validation.invalidAddressList"));
|
||||||
|
GridPane.setHgrow(autoConfServiceAddressTf, Priority.ALWAYS);
|
||||||
displayCurrenciesGridRowIndex += 4;
|
displayCurrenciesGridRowIndex += 4;
|
||||||
|
|
||||||
|
autoConfServiceAddressListener = (observable, oldValue, newValue) -> {
|
||||||
|
if (!newValue.equals(oldValue) && autoConfServiceAddressTf.getValidator().validate(newValue).isValid) {
|
||||||
|
List<String> serviceAddresses = Arrays.asList(StringUtils.deleteWhitespace(newValue).split(","));
|
||||||
|
// revert to default service providers when user empties the list
|
||||||
|
if (serviceAddresses.size() == 1 && serviceAddresses.get(0).isEmpty()) {
|
||||||
|
serviceAddresses = Preferences.getDefaultXmrProofProviders();
|
||||||
|
}
|
||||||
|
preferences.setAutoConfServiceAddresses("XMR", serviceAddresses);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
autoConfRequiredConfirmationsListener = (observable, oldValue, newValue) -> {
|
||||||
|
if (!newValue.equals(oldValue) && autoConfRequiredConfirmationsTf.getValidator().validate(newValue).isValid) {
|
||||||
|
int requiredConfirmations = Integer.parseInt(newValue);
|
||||||
|
preferences.setAutoConfRequiredConfirmations("XMR", requiredConfirmations);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
autoConfTradeLimitListener = (observable, oldValue, newValue) -> {
|
||||||
|
if (!newValue.equals(oldValue) && autoConfTradeLimitTf.getValidator().validate(newValue).isValid) {
|
||||||
|
Coin amountAsCoin = ParsingUtils.parseToCoin(newValue, formatter);
|
||||||
|
preferences.setAutoConfTradeLimit("XMR", amountAsCoin.value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
autoConfFocusOutListener = (observable, oldValue, newValue) -> {
|
autoConfFocusOutListener = (observable, oldValue, newValue) -> {
|
||||||
if (oldValue && !newValue) {
|
if (oldValue && !newValue) {
|
||||||
log.info("Service address focus out, check and re-display default option");
|
log.info("Service address focus out, check and re-display default option");
|
||||||
if (autoConfServiceAddress.getText().length() == 0) {
|
if (autoConfServiceAddressTf.getText().isEmpty()) {
|
||||||
autoConfServiceAddress.setText(String.join(", ",
|
preferences.findAutoConfirmSettings("XMR").ifPresent(autoConfirmSettings -> {
|
||||||
preferences.getAutoConfirmSettings().serviceAddresses));
|
List<String> serviceAddresses = autoConfirmSettings.getServiceAddresses();
|
||||||
|
autoConfServiceAddressTf.setText(String.join(", ", serviceAddresses));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -926,59 +959,21 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
}
|
}
|
||||||
|
|
||||||
private void activateAutoConfirmPreferences() {
|
private void activateAutoConfirmPreferences() {
|
||||||
AutoConfirmSettings init = preferences.getAutoConfirmSettings();
|
preferences.findAutoConfirmSettings("XMR").ifPresent(autoConfirmSettings -> {
|
||||||
autoConfirmXmr.setSelected(init.enabled);
|
autoConfirmXmrToggle.setSelected(autoConfirmSettings.isEnabled());
|
||||||
autoConfRequiredConfirmations.setText(String.valueOf(init.requiredConfirmations));
|
autoConfRequiredConfirmationsTf.setText(String.valueOf(autoConfirmSettings.getRequiredConfirmations()));
|
||||||
autoConfTradeLimit.setText(formatter.formatCoin(Coin.valueOf(init.tradeLimit)));
|
autoConfTradeLimitTf.setText(formatter.formatCoin(Coin.valueOf(autoConfirmSettings.getTradeLimit())));
|
||||||
autoConfServiceAddress.setText(String.join(", ", init.serviceAddresses));
|
autoConfServiceAddressTf.setText(String.join(", ", autoConfirmSettings.getServiceAddresses()));
|
||||||
|
|
||||||
autoConfirmXmr.setOnAction(e -> {
|
autoConfRequiredConfirmationsTf.textProperty().addListener(autoConfRequiredConfirmationsListener);
|
||||||
boolean enabled = autoConfirmXmr.isSelected();
|
autoConfTradeLimitTf.textProperty().addListener(autoConfTradeLimitListener);
|
||||||
AutoConfirmSettings x = preferences.getAutoConfirmSettings();
|
autoConfServiceAddressTf.textProperty().addListener(autoConfServiceAddressListener);
|
||||||
preferences.setAutoConfirmSettings(
|
autoConfServiceAddressTf.focusedProperty().addListener(autoConfFocusOutListener);
|
||||||
new AutoConfirmSettings(enabled, x.requiredConfirmations, x.tradeLimit, x.serviceAddresses, x.currencyCode));
|
|
||||||
|
autoConfirmXmrToggle.setOnAction(e -> {
|
||||||
|
preferences.setAutoConfEnabled(autoConfirmSettings.getCurrencyCode(), autoConfirmXmrToggle.isSelected());
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
autoConfServiceAddress.setValidator(GUIUtil.addressRegexValidator());
|
|
||||||
autoConfServiceAddress.setErrorMessage(Res.get("validation.invalidAddressList"));
|
|
||||||
autoConfServiceAddressListener = (observable, oldValue, newValue) -> {
|
|
||||||
if (GUIUtil.addressRegexValidator().validate(newValue).isValid && !newValue.equals(oldValue)) {
|
|
||||||
List<String> serviceAddresses = Arrays.asList(StringUtils.deleteWhitespace(newValue).split(","));
|
|
||||||
// revert to default service providers when user empties the list
|
|
||||||
if (serviceAddresses.size() == 1 && serviceAddresses.get(0).length() == 0)
|
|
||||||
serviceAddresses = Preferences.getDefaultXmrProofProviders();
|
|
||||||
preferences.setAutoConfServiceAddresses(serviceAddresses);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
IntegerValidator validator = new IntegerValidator();
|
|
||||||
validator.setMinValue(1); validator.setMaxValue(10000);
|
|
||||||
autoConfRequiredConfirmations.setValidator(validator);
|
|
||||||
autoConfRequiredConfirmationsListener = (observable, oldValue, newValue) -> {
|
|
||||||
try {
|
|
||||||
int value = Integer.parseInt(newValue);
|
|
||||||
if (!newValue.equals(oldValue)) {
|
|
||||||
AutoConfirmSettings x = preferences.getAutoConfirmSettings();
|
|
||||||
preferences.setAutoConfirmSettings(
|
|
||||||
new AutoConfirmSettings(x.enabled, value, x.tradeLimit, x.serviceAddresses, x.currencyCode));
|
|
||||||
}
|
|
||||||
} catch (Throwable ignore) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
autoConfTradeLimitListener = (observable, oldValue, newValue) -> {
|
|
||||||
try {
|
|
||||||
Coin amountAsCoin = ParsingUtils.parseToCoin(newValue, formatter);
|
|
||||||
AutoConfirmSettings x = preferences.getAutoConfirmSettings();
|
|
||||||
preferences.setAutoConfirmSettings(
|
|
||||||
new AutoConfirmSettings(x.enabled, x.requiredConfirmations, amountAsCoin.value, x.serviceAddresses, x.currencyCode));
|
|
||||||
} catch (Throwable ignore) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
autoConfRequiredConfirmations.textProperty().addListener(autoConfRequiredConfirmationsListener);
|
|
||||||
autoConfTradeLimit.textProperty().addListener(autoConfTradeLimitListener);
|
|
||||||
autoConfServiceAddress.textProperty().addListener(autoConfServiceAddressListener);
|
|
||||||
autoConfServiceAddress.focusedProperty().addListener(autoConfFocusOutListener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDaoFields() {
|
private void updateDaoFields() {
|
||||||
|
@ -1051,10 +1046,10 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deactivateAutoConfirmPreferences() {
|
private void deactivateAutoConfirmPreferences() {
|
||||||
autoConfirmXmr.setOnAction(null);
|
autoConfirmXmrToggle.setOnAction(null);
|
||||||
autoConfRequiredConfirmations.textProperty().removeListener(autoConfRequiredConfirmationsListener);
|
autoConfRequiredConfirmationsTf.textProperty().removeListener(autoConfRequiredConfirmationsListener);
|
||||||
autoConfTradeLimit.textProperty().removeListener(autoConfTradeLimitListener);
|
autoConfTradeLimitTf.textProperty().removeListener(autoConfTradeLimitListener);
|
||||||
autoConfServiceAddress.textProperty().removeListener(autoConfServiceAddressListener);
|
autoConfServiceAddressTf.textProperty().removeListener(autoConfServiceAddressListener);
|
||||||
autoConfServiceAddress.focusedProperty().removeListener(autoConfFocusOutListener);
|
autoConfServiceAddressTf.focusedProperty().removeListener(autoConfFocusOutListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1175,10 +1175,10 @@ public class GUIUtil {
|
||||||
case INVALID_DATA:
|
case INVALID_DATA:
|
||||||
return Res.get(key, result.getDetails());
|
return Res.get(key, result.getDetails());
|
||||||
case PAYOUT_TX_ALREADY_PUBLISHED:
|
case PAYOUT_TX_ALREADY_PUBLISHED:
|
||||||
case REQUEST_STARTED:
|
case REQUESTS_STARTED:
|
||||||
return Res.get(key);
|
return Res.get(key);
|
||||||
case PENDING:
|
case PENDING:
|
||||||
return Res.get(key, result.getNumSuccessResults(), result.getRequiredSuccessResults(), result.getDetails());
|
return Res.get(key, result.getNumSuccessResults(), result.getNumRequiredSuccessResults(), result.getDetails());
|
||||||
case COMPLETED:
|
case COMPLETED:
|
||||||
case ERROR:
|
case ERROR:
|
||||||
case FAILED:
|
case FAILED:
|
||||||
|
|
Loading…
Add table
Reference in a new issue