fix 400 error on order creation

This commit is contained in:
jejolare 2026-03-11 12:34:00 +01:00
parent f8bcaacb63
commit f241c79bc3

View file

@ -65,7 +65,9 @@ class OrdersController {
}
const totalDecimal = priceDecimal.mul(amountDecimal);
const total = totalDecimal.toFixed();
const total = totalDecimal
.toDecimalPlaces(secondCurrencyDP, Decimal.ROUND_DOWN)
.toFixed();
const isPriceValid = validateTokensInput(price, secondCurrencyDP).valid;
const isAmountValid = validateTokensInput(amount, firstCurrencyDP).valid;