Fix order match link
This commit is contained in:
parent
272591b015
commit
7fc63f44cd
|
@ -43,14 +43,14 @@ const click = (order) => {
|
|||
const stake = order.quantity * (100 - order.price)
|
||||
const certainty = (100 - order.price) / 100
|
||||
const share = order.ShareDescription === 'YES' ? 'NO' : 'YES'
|
||||
router.push(`/market/${marketId}/form/buy?stake=${stake}&certainty=${certainty}&share=${share}`)
|
||||
router.push(`/market/${marketId}/form?stake=${stake}&certainty=${certainty}&share=${share}&side=BUY`)
|
||||
}
|
||||
if (order.side === 'SELL') {
|
||||
// match SELL YES with BUY YES and vice versa
|
||||
// SELL YES -> BUY YES, SELL NO -> BUY NO
|
||||
const stake = order.quantity * order.price
|
||||
const certainty = order.price / 100
|
||||
const share = order.ShareDescription === 'YES' ? 'YES' : 'NO'
|
||||
router.push(`/market/${marketId}/form/buy?stake=${stake}&certainty=${certainty}&share=${share}`)
|
||||
router.push(`/market/${marketId}/form?stake=${stake}&certainty=${certainty}&share=${share}&side=BUY`)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue