mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-19 03:38:12 -04:00
fix adjustment < min amount creating offers
This commit is contained in:
parent
4f5f82bf0f
commit
f261a38cce
3 changed files with 10 additions and 11 deletions
|
@ -524,6 +524,7 @@ public abstract class MutableOfferDataModel extends OfferDataModel {
|
|||
// if the volume != amount * price, we need to adjust the amount
|
||||
if (amount.get() == null || !volumeBefore.equals(price.get().getVolumeByAmount(amount.get()))) {
|
||||
BigInteger value = price.get().getAmountByVolume(volumeBefore);
|
||||
value = value.max(Restrictions.getMinTradeAmount()); // adjust if below minimum
|
||||
value = CoinUtil.getRoundedAmount(value, price.get(), getMaxTradeLimit(), tradeCurrencyCode.get(), paymentAccount.getPaymentMethod().getId());
|
||||
amount.set(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue