change to limit order on book price click

This commit is contained in:
saml33 2023-07-01 20:28:31 +10:00
parent 239cb1990b
commit 7afcfb897b
1 changed files with 2 additions and 1 deletions

View File

@ -854,7 +854,8 @@ const OrderbookRow = ({
const set = mangoStore.getState().set
set((state) => {
state.tradeForm.price = formattedPrice.toFixed()
if (state.tradeForm.baseSize && state.tradeForm.tradeType === 'Limit') {
state.tradeForm.tradeType = 'Limit'
if (state.tradeForm.baseSize) {
const quoteSize = floorToDecimal(
formattedPrice.mul(new Decimal(state.tradeForm.baseSize)),
getDecimalCount(tickSize)