fix perp position table tize click
This commit is contained in:
parent
ab62e89893
commit
1a6e1d5b6d
|
@ -59,14 +59,15 @@ const PerpPositions = () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const newSide = positionSize > 0 ? 'sell' : 'buy'
|
const newSide = positionSize > 0 ? 'sell' : 'buy'
|
||||||
|
const baseSize = Math.abs(positionSize)
|
||||||
const quoteSize = floorToDecimal(
|
const quoteSize = floorToDecimal(
|
||||||
positionSize * price,
|
baseSize * price,
|
||||||
getDecimalCount(market.tickSize)
|
getDecimalCount(market.tickSize)
|
||||||
)
|
)
|
||||||
|
|
||||||
set((s) => {
|
set((s) => {
|
||||||
s.tradeForm.side = newSide
|
s.tradeForm.side = newSide
|
||||||
s.tradeForm.baseSize = positionSize.toString()
|
s.tradeForm.baseSize = baseSize.toString()
|
||||||
s.tradeForm.quoteSize = quoteSize.toString()
|
s.tradeForm.quoteSize = quoteSize.toString()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue