diff --git a/components/trade/TradeSummary.tsx b/components/trade/TradeSummary.tsx index 759170b7..77ed47ef 100644 --- a/components/trade/TradeSummary.tsx +++ b/components/trade/TradeSummary.tsx @@ -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)