increase trade limits by factor of 10

popup warning displays effective trade limit
This commit is contained in:
woodser 2021-05-23 09:38:40 -04:00
parent 2be32fcb8d
commit be2a71b9b5
4 changed files with 11 additions and 6 deletions

View file

@ -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());

View file

@ -44,6 +44,7 @@ public class BtcValidator extends NumberValidator {
@Nullable
@Setter
@Getter
protected Coin maxValue;
@Nullable