fix 0 dp handling
This commit is contained in:
parent
a5d81dc07b
commit
f6ab4e38e0
1 changed files with 4 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue