From 7551cdc73a894c7811a868264196fef103b265b9 Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Sat, 18 Apr 2020 23:21:21 -0500 Subject: [PATCH] Editing an offer should not allow the BTC amount to be changed When editing an offer to adjust the price the fiat amount is recalculated to reflect the new price. The BTC amount should not change. Due to a bug, sometimes the BTC amounts were changed due to a recalculation from the fiat amount. This PR Fixes 2798 by disabling a call to recalculate BTC and min BTC amounts when editing. --- .../bisq/desktop/main/offer/MutableOfferViewModel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java index 7d4125a3e2c..f8f787a1a15 100644 --- a/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java +++ b/desktop/src/main/java/bisq/desktop/main/offer/MutableOfferViewModel.java @@ -812,9 +812,10 @@ void onFocusOutPriceTextField(boolean oldValue, boolean newValue) { // We want to trigger a recalculation of the volume and minAmount UserThread.execute(() -> { onFocusOutVolumeTextField(true, false); - // We also need to update minAmount - onFocusOutAmountTextField(true, false); - onFocusOutMinAmountTextField(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); }); } }