mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-21 14:18:50 -04:00
fix min amount creating offer after setting volume (#1858)
This commit is contained in:
parent
4627960c05
commit
dff7e88428
2 changed files with 5 additions and 2 deletions
|
@ -486,6 +486,10 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
}
|
||||
}
|
||||
|
||||
BigInteger getMinTradeLimit() {
|
||||
return Restrictions.getMinTradeAmount();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Utils
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1220,9 +1220,8 @@ public abstract class MutableOfferViewModel<M extends MutableOfferDataModel> ext
|
|||
BigInteger minAmount = HavenoUtils.coinToAtomicUnits(DisplayUtils.parseToCoinWith4Decimals(this.minAmount.get(), xmrFormatter));
|
||||
|
||||
Price price = dataModel.getPrice().get();
|
||||
BigInteger maxTradeLimit = dataModel.getMaxTradeLimit();
|
||||
if (price != null && price.isPositive()) {
|
||||
minAmount = CoinUtil.getRoundedAmount(minAmount, price, dataModel.getMinAmount().get(), maxTradeLimit, tradeCurrencyCode.get(), dataModel.getPaymentAccount().getPaymentMethod().getId());
|
||||
minAmount = CoinUtil.getRoundedAmount(minAmount, price, dataModel.getMinTradeLimit(), dataModel.getMaxTradeLimit(), tradeCurrencyCode.get(), dataModel.getPaymentAccount().getPaymentMethod().getId());
|
||||
}
|
||||
|
||||
dataModel.setMinAmount(minAmount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue