fix adjusting amounts by smallest volume increments

This commit is contained in:
woodser 2023-11-02 09:37:16 -04:00
parent 4749d286da
commit 0f7ace7326

View File

@ -168,7 +168,6 @@ public class CoinUtil {
// 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);