use long/short for perp order lines

This commit is contained in:
saml33 2023-05-24 11:22:09 +10:00
parent 88614f8bd7
commit 846e574a71
1 changed files with 6 additions and 4 deletions

View File

@ -366,10 +366,12 @@ const TradingViewChart = () => {
typeof order.side === 'string' typeof order.side === 'string'
? t(order.side) ? t(order.side)
: 'bid' in order.side : 'bid' in order.side
? t('buy') ? t('long')
: t('sell') : t('short')
const isLong = side.toLowerCase() === 'buy' const isLong =
const isShort = side.toLowerCase() === 'sell' side.toLowerCase() === 'buy' || side.toLowerCase() === 'long'
const isShort =
side.toLowerCase() === 'sell' || side.toLowerCase() === 'short'
const [minOrderDecimals, tickSizeDecimals] = getOrderDecimals() const [minOrderDecimals, tickSizeDecimals] = getOrderDecimals()
const orderSizeUi: string = formatNumericValue( const orderSizeUi: string = formatNumericValue(
order.size, order.size,