mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Revert setting of deposit when cloning an offer
This commit is contained in:
parent
150ffc3b2b
commit
b4520237b0
@ -484,7 +484,6 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
||||
if (dataModel.getAmount().get() != null) {
|
||||
buyerSecurityDepositInBTC.set(btcFormatter.formatCoinWithCode(dataModel.getBuyerSecurityDepositAsCoin()));
|
||||
}
|
||||
updateBuyerSecurityDeposit();
|
||||
} else {
|
||||
buyerSecurityDeposit.set("");
|
||||
buyerSecurityDepositInBTC.set("");
|
||||
|
@ -24,7 +24,6 @@ import bisq.desktop.main.offer.MutableOfferDataModel;
|
||||
import bisq.core.account.witness.AccountAgeWitnessService;
|
||||
import bisq.core.btc.wallet.BsqWalletService;
|
||||
import bisq.core.btc.wallet.BtcWalletService;
|
||||
import bisq.core.btc.wallet.Restrictions;
|
||||
import bisq.core.offer.CreateOfferService;
|
||||
import bisq.core.offer.Offer;
|
||||
import bisq.core.offer.OfferUtil;
|
||||
@ -36,12 +35,9 @@ import bisq.core.user.Preferences;
|
||||
import bisq.core.user.User;
|
||||
import bisq.core.util.FormattingUtils;
|
||||
import bisq.core.util.coin.CoinFormatter;
|
||||
import bisq.core.util.coin.CoinUtil;
|
||||
|
||||
import bisq.network.p2p.P2PService;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import javax.inject.Named;
|
||||
@ -90,18 +86,8 @@ class DuplicateOfferDataModel extends MutableOfferDataModel {
|
||||
setVolume(offer.getVolume());
|
||||
setUseMarketBasedPrice(offer.isUseMarketBasedPrice());
|
||||
|
||||
setBuyerSecurityDeposit(getBuyerSecurityAsPercent(offer));
|
||||
|
||||
if (offer.isUseMarketBasedPrice()) {
|
||||
setMarketPriceMargin(offer.getMarketPriceMargin());
|
||||
}
|
||||
}
|
||||
|
||||
private double getBuyerSecurityAsPercent(Offer offer) {
|
||||
Coin offerBuyerSecurityDeposit = getBoundedBuyerSecurityDepositAsCoin(offer.getBuyerSecurityDeposit());
|
||||
double offerBuyerSecurityDepositAsPercent = CoinUtil.getAsPercentPerBtc(offerBuyerSecurityDeposit,
|
||||
offer.getAmount());
|
||||
return Math.min(offerBuyerSecurityDepositAsPercent,
|
||||
Restrictions.getMaxBuyerSecurityDepositAsPercent());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user