Only show probabilty update with arrow if probability changes
This commit is contained in:
parent
67b3450924
commit
f4b7b9efd0
|
@ -250,6 +250,9 @@ function BuyPanel(props: {
|
||||||
)
|
)
|
||||||
|
|
||||||
const resultProb = getCpmmProbability(newPool, newP)
|
const resultProb = getCpmmProbability(newPool, newP)
|
||||||
|
const probStayedSame =
|
||||||
|
formatPercent(resultProb) === formatPercent(initialProb)
|
||||||
|
|
||||||
const remainingMatched = isLimitOrder
|
const remainingMatched = isLimitOrder
|
||||||
? ((newBet.orderAmount ?? 0) - newBet.amount) /
|
? ((newBet.orderAmount ?? 0) - newBet.amount) /
|
||||||
(betChoice === 'YES' ? limitProbFrac : 1 - limitProbFrac)
|
(betChoice === 'YES' ? limitProbFrac : 1 - limitProbFrac)
|
||||||
|
@ -339,11 +342,15 @@ function BuyPanel(props: {
|
||||||
<div className="text-gray-500">
|
<div className="text-gray-500">
|
||||||
{isPseudoNumeric ? 'Estimated value' : 'Probability'}
|
{isPseudoNumeric ? 'Estimated value' : 'Probability'}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
{probStayedSame ? (
|
||||||
{format(initialProb)}
|
<div>{format(initialProb)}</div>
|
||||||
<span className="mx-2">→</span>
|
) : (
|
||||||
{format(resultProb)}
|
<div>
|
||||||
</div>
|
{format(initialProb)}
|
||||||
|
<span className="mx-2">→</span>
|
||||||
|
{format(resultProb)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user