mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Change max. deviation of market price #1356
This commit is contained in:
parent
bd6b70a8ba
commit
521dd62114
@ -757,7 +757,7 @@ setting.preferences.general=General preferences
|
||||
setting.preferences.explorer=Bitcoin block explorer:
|
||||
setting.preferences.deviation=Max. deviation from market price:
|
||||
setting.preferences.autoSelectArbitrators=Auto select arbitrators:
|
||||
setting.preferences.deviationToLarge=Values higher than 30 % are not allowed.
|
||||
setting.preferences.deviationToLarge=Values higher than {0}% are not allowed.
|
||||
setting.preferences.txFee=Withdrawal transaction fee (satoshi/byte):
|
||||
setting.preferences.useCustomValue=Use custom value
|
||||
setting.preferences.txFeeMin=Transaction fee must be at least {0} satoshi/byte
|
||||
|
@ -44,7 +44,7 @@ public final class PreferencesPayload implements PersistableEnvelope {
|
||||
private TradeCurrency preferredTradeCurrency;
|
||||
private long withdrawalTxFeeInBytes = 100;
|
||||
private boolean useCustomWithdrawalTxFee = false;
|
||||
private double maxPriceDistanceInPercent = 0.1;
|
||||
private double maxPriceDistanceInPercent = 0.3;
|
||||
@Nullable
|
||||
private String offerBookChartScreenCurrencyCode;
|
||||
@Nullable
|
||||
|
@ -249,10 +249,11 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Activatab
|
||||
deviationListener = (observable, oldValue, newValue) -> {
|
||||
try {
|
||||
double value = formatter.parsePercentStringToDouble(newValue);
|
||||
if (value <= 0.3) {
|
||||
final double maxDeviation = 0.5;
|
||||
if (value <= maxDeviation) {
|
||||
preferences.setMaxPriceDistanceInPercent(value);
|
||||
} else {
|
||||
new Popup<>().warning(Res.get("setting.preferences.deviationToLarge")).show();
|
||||
new Popup<>().warning(Res.get("setting.preferences.deviationToLarge", maxDeviation * 100)).show();
|
||||
UserThread.runAfter(() -> deviationInputTextField.setText(formatter.formatPercentagePrice(preferences.getMaxPriceDistanceInPercent())), 100, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
} catch (NumberFormatException t) {
|
||||
|
Loading…
Reference in New Issue
Block a user