diff --git a/src/models/Orders.ts b/src/models/Orders.ts index 46b3405..91a770b 100644 --- a/src/models/Orders.ts +++ b/src/models/Orders.ts @@ -77,7 +77,10 @@ class OrdersModel { if (!userRow) throw new Error('Invalid address from token.'); const timestamp = Date.now(); - const firstCurrencyDecimalPoint = firstCurrency?.asset_info?.decimal_point || 12; + const firstCurrencyDecimalPoint = + firstCurrency?.asset_info?.decimal_point === undefined + ? 12 + : firstCurrency.asset_info.decimal_point; const newOrder = await Order.create({ type: orderData.type === 'buy' ? 'buy' : 'sell',