uses referrerpk if it exists for modifyPerpOrder

This commit is contained in:
tjs 2022-02-14 21:32:31 -05:00
parent 2824be1e8d
commit bd4c4145b5
3 changed files with 5 additions and 3 deletions

View File

@ -39,6 +39,7 @@ const MarketCloseModal: FunctionComponent<MarketCloseModalProps> = ({
const orderbook = useMangoStore.getState().selectedMarket.orderBook
const markPrice = useMangoStore.getState().selectedMarket.markPrice
const referrerPk = useMangoStore.getState().referrerPk
// The reference price is the book mid if book is double sided; else mark price
const bb = orderbook?.bids?.length > 0 && Number(orderbook.bids[0][0])
@ -70,7 +71,8 @@ const MarketCloseModal: FunctionComponent<MarketCloseModalProps> = ({
'ioc',
0, // client order id
side === 'buy' ? askInfo : bidInfo,
true // reduce only
true, // reduce only
referrerPk ? referrerPk : undefined
)
await sleep(500)
actions.reloadMangoAccount()

View File

@ -458,7 +458,7 @@ const OpenOrdersTable = () => {
0,
order.side === 'buy' ? askInfo : bidInfo,
false,
referrerPk
referrerPk ? referrerPk : undefined
)
}
notify({ title: t('successfully-placed'), txid })

View File

@ -314,7 +314,7 @@ const TVChartContainer = () => {
0,
order.side === 'buy' ? askInfo : bidInfo,
false,
referrerPk
referrerPk ? referrerPk : undefined
)
}