mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
increase trade limits by factor of 10
popup warning displays effective trade limit
This commit is contained in:
parent
2be32fcb8d
commit
be2a71b9b5
4 changed files with 11 additions and 6 deletions
|
@ -36,7 +36,7 @@ public class OfferRestrictions {
|
|||
return new Date().after(REQUIRE_UPDATE_DATE);
|
||||
}
|
||||
|
||||
public static Coin TOLERATED_SMALL_TRADE_AMOUNT = Coin.parseCoin("0.1");
|
||||
public static Coin TOLERATED_SMALL_TRADE_AMOUNT = Coin.parseCoin("1.0");
|
||||
|
||||
static boolean hasOfferMandatoryCapability(Offer offer, Capability mandatoryCapability) {
|
||||
Map<String, String> extraDataMap = offer.getOfferPayload().getExtraDataMap();
|
||||
|
|
|
@ -60,10 +60,10 @@ public final class PaymentMethod implements PersistablePayload, Comparable<Payme
|
|||
// risk factor so the relation between the risk categories stays the same as with the default values.
|
||||
// We must not change those values as it could lead to invalid offers if amount becomes lower then new trade limit.
|
||||
// Increasing might be ok, but needs more thought as well...
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_VERY_LOW_RISK = Coin.parseCoin("10");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_LOW_RISK = Coin.parseCoin("5");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_MID_RISK = Coin.parseCoin("2.5");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_HIGH_RISK = Coin.parseCoin("1.25");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_VERY_LOW_RISK = Coin.parseCoin("100");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_LOW_RISK = Coin.parseCoin("50");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_MID_RISK = Coin.parseCoin("25");
|
||||
private static final Coin DEFAULT_TRADE_LIMIT_HIGH_RISK = Coin.parseCoin("12.5");
|
||||
|
||||
public static final String UPHOLD_ID = "UPHOLD";
|
||||
public static final String MONEY_BEAM_ID = "MONEY_BEAM";
|
||||
|
|
|
@ -729,7 +729,7 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
|||
} else if (amount.get() != null && btcValidator.getMaxTradeLimit() != null && btcValidator.getMaxTradeLimit().value == OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT.value) {
|
||||
amount.set(btcFormatter.formatCoin(btcValidator.getMaxTradeLimit()));
|
||||
new Popup().information(Res.get("popup.warning.tradeLimitDueAccountAgeRestriction.buyer",
|
||||
btcFormatter.formatCoinWithCode(OfferRestrictions.TOLERATED_SMALL_TRADE_AMOUNT),
|
||||
btcFormatter.formatCoinWithCode(getEffectiveLimit()),
|
||||
Res.get("offerbook.warning.newVersionAnnouncement")))
|
||||
.width(900)
|
||||
.show();
|
||||
|
@ -746,6 +746,10 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
|||
}
|
||||
}
|
||||
|
||||
private Coin getEffectiveLimit() {
|
||||
return btcValidator.getMaxValue() == null ? btcValidator.getMaxTradeLimit() : btcValidator.getMaxValue();
|
||||
}
|
||||
|
||||
public void onFocusOutMinAmountTextField(boolean oldValue, boolean newValue) {
|
||||
if (oldValue && !newValue) {
|
||||
InputValidator.ValidationResult result = isBtcInputValid(minAmount.get());
|
||||
|
|
|
@ -44,6 +44,7 @@ public class BtcValidator extends NumberValidator {
|
|||
|
||||
@Nullable
|
||||
@Setter
|
||||
@Getter
|
||||
protected Coin maxValue;
|
||||
|
||||
@Nullable
|
||||
|
|
Loading…
Reference in a new issue