Merge pull request #4291 from ripcurlx/only-apply-fix-in-edit-offer-screen

Apply fix for #2798 only in edit offer view
This commit is contained in:
sqrrm 2020-06-11 11:02:21 +02:00 committed by GitHub
commit 90583817b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -812,14 +812,16 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
// We want to trigger a recalculation of the volume and minAmount
UserThread.execute(() -> {
onFocusOutVolumeTextField(true, false);
// do not update BTC Amount or minAmount here
// issue 2798: "after a few edits of offer the BTC amount has increased"
// intentionally removed: onFocusOutAmountTextField(true, false);
// intentionally removed: onFocusOutMinAmountTextField(true, false);
triggerFocusOutOnAmountFields();
});
}
}
public void triggerFocusOutOnAmountFields() {
onFocusOutAmountTextField(true, false);
onFocusOutMinAmountTextField(true, false);
}
public void onFocusOutPriceAsPercentageTextField(boolean oldValue, boolean newValue) {
inputIsMarketBasedPrice = !oldValue && newValue;
if (oldValue && !newValue) {

View file

@ -30,8 +30,8 @@ import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.offer.OpenOffer;
import bisq.core.provider.price.PriceFeedService;
import bisq.core.user.Preferences;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.FormattingUtils;
import bisq.core.util.coin.BsqFormatter;
import bisq.core.util.coin.CoinFormatter;
import bisq.common.handlers.ErrorMessageHandler;
@ -108,4 +108,10 @@ class EditOfferViewModel extends MutableOfferViewModel<EditOfferDataModel> {
public boolean isSecurityDepositValid() {
return securityDepositValidator.validate(buyerSecurityDeposit.get()).isValid;
}
@Override
public void triggerFocusOutOnAmountFields() {
// do not update BTC Amount or minAmount here
// issue 2798: "after a few edits of offer the BTC amount has increased"
}
}