Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

just assume bets in mana #2880

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions web/components/comments/comment-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,16 @@ export function FeedCommentHeader(props: {
isRepost,
betOrderAmount,
betLimitProb,
contractSlug,
} = comment

const betOnCashContract = contractSlug.endsWith(CASH_SUFFIX)
const isCashContract = contract.token === 'CASH'
const marketCreator = contract.creatorId === userId
const { bought, money } = getBoughtMoney(betAmount, betOnCashContract)
const { bought, money } = getBoughtMoney(betAmount, false)
const shouldDisplayOutcome = betOutcome && !answerOutcome
const isReplyToBet = betAmount !== undefined
const commenterIsBettor = commenterAndBettorMatch(comment)
const isLimitBet = betOrderAmount !== undefined && betLimitProb !== undefined

return (
<Col className={clsx('text-ink-600 text-sm', className)}>
<Row className="justify-between">
Expand All @@ -104,10 +103,8 @@ export function FeedCommentHeader(props: {
<span className={'ml-1'}>
{betAmount === betOrderAmount ? 'filled' : 'opened'} a{' '}
<span className="text-ink-1000">
<MoneyDisplay
amount={betOrderAmount}
isCashContract={betOnCashContract}
/>
{/* assumes bets are never in sweeps */}
<MoneyDisplay amount={betOrderAmount} isCashContract={false} />
</span>{' '}
<OutcomeLabel
outcome={betOutcome ? betOutcome : ''}
Expand Down
Loading