Skip to content

Commit d5b32fe

Browse files
committed
fix 400 error on order creation
1 parent 8f8c506 commit d5b32fe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/controllers/orders.controller.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ class OrdersController {
6565
}
6666

6767
const totalDecimal = priceDecimal.mul(amountDecimal);
68-
const total = totalDecimal.toFixed();
68+
const total = totalDecimal
69+
.toDecimalPlaces(secondCurrencyDP, Decimal.ROUND_DOWN)
70+
.toFixed();
6971

7072
const isPriceValid = validateTokensInput(price, secondCurrencyDP).valid;
7173
const isAmountValid = validateTokensInput(amount, firstCurrencyDP).valid;

0 commit comments

Comments
 (0)