fix size buttons for perp

This commit is contained in:
saml33 2021-09-27 22:36:25 +10:00
parent efe04b8df1
commit 7b69b22feb
1 changed files with 2 additions and 1 deletions

View File

@ -353,7 +353,8 @@ export default function AdvancedTradeForm({
const handleSetPositionSize = (percent) => {
setPositionSizePercent(percent)
const baseSizeMax = spotMargin ? max : spotMax
const baseSizeMax =
spotMargin || marketConfig.kind === 'perp' ? max : spotMax
const baseSize = baseSizeMax * (parseInt(percent) / 100)
const step = parseFloat(minOrderSize)
const roundedSize = (Math.round(baseSize / step) * step).toFixed(