dont check postonlyslide when market ordering

This commit is contained in:
tjs 2022-04-05 17:10:45 -04:00
parent 0f6944614d
commit d5c2c1e2ba
1 changed files with 3 additions and 3 deletions

View File

@ -643,9 +643,7 @@ export default function AdvancedTradeForm({
let perpOrderPrice: number = orderPrice let perpOrderPrice: number = orderPrice
if (isMarketOrder) { if (isMarketOrder) {
if (postOnlySlide) { if (tradeType === 'Market' && maxSlippage) {
perpOrderType = 'postOnlySlide'
} else if (tradeType === 'Market' && maxSlippage) {
perpOrderType = 'ioc' perpOrderType = 'ioc'
if (side === 'buy') { if (side === 'buy') {
perpOrderPrice = markPrice * (1 + parseFloat(maxSlippage)) perpOrderPrice = markPrice * (1 + parseFloat(maxSlippage))
@ -658,6 +656,8 @@ export default function AdvancedTradeForm({
} else { } else {
perpOrderType = 'market' perpOrderType = 'market'
} }
} else {
perpOrderType = postOnlySlide ? 'postOnlySlide' : orderType
} }
if (isTriggerOrder) { if (isTriggerOrder) {