fix bug with decimal in trade form
This commit is contained in:
parent
506433e539
commit
1f30784930
|
@ -104,7 +104,13 @@ const TradeSummary = ({
|
|||
}, [balanceBank, mangoAccount, tradeForm])
|
||||
|
||||
const orderValue = useMemo(() => {
|
||||
if (!quoteBank || !tradeForm.price || !tradeForm.baseSize) return 0
|
||||
if (
|
||||
!quoteBank ||
|
||||
!tradeForm.price ||
|
||||
!Number.isNaN(tradeForm.price) ||
|
||||
!Number.isNaN(tradeForm.baseSize)
|
||||
)
|
||||
return 0
|
||||
const basePriceDecimal = new Decimal(tradeForm.price)
|
||||
const quotePriceDecimal = new Decimal(quoteBank.uiPrice)
|
||||
const sizeDecimal = new Decimal(tradeForm.baseSize)
|
||||
|
|
Loading…
Reference in New Issue