diff --git a/core/src/main/java/haveno/core/util/coin/CoinUtil.java b/core/src/main/java/haveno/core/util/coin/CoinUtil.java index ecdbdc15..eb818198 100644 --- a/core/src/main/java/haveno/core/util/coin/CoinUtil.java +++ b/core/src/main/java/haveno/core/util/coin/CoinUtil.java @@ -166,8 +166,10 @@ public class CoinUtil { long adjustedAmount = HavenoUtils.centinerosToAtomicUnits(Math.round(HavenoUtils.atomicUnitsToCentineros(amountByVolume) / 10000d) * 10000).longValueExact(); // If we are above our trade limit we reduce the amount by the smallestUnitForAmount + BigInteger smallestUnitForAmountUnadjusted = price.getAmountByVolume(smallestUnitForVolume); while (adjustedAmount > maxTradeLimit) { adjustedAmount -= smallestUnitForAmount.longValueExact(); + adjustedAmount -= smallestUnitForAmountUnadjusted.longValueExact(); } adjustedAmount = Math.max(minTradeAmount, adjustedAmount); adjustedAmount = Math.min(maxTradeLimit, adjustedAmount);