Filter redemption bets out of market 'Bets' tab

This commit is contained in:
James Grugett 2022-05-28 15:57:12 -05:00
parent 90a8de09d7
commit 23944bf47a
2 changed files with 2 additions and 4 deletions

View File

@ -479,9 +479,7 @@ export function getRecentContractActivityItems(
}
) {
const { contractPath } = options
bets = bets
.filter((bet) => !bet.isRedemption)
.sort((b1, b2) => b1.createdTime - b2.createdTime)
bets = bets.sort((b1, b2) => b1.createdTime - b2.createdTime)
comments = comments.sort((c1, c2) => c1.createdTime - c2.createdTime)
const questionItem: QuestionItem = {

View File

@ -39,7 +39,7 @@ export function ContractActivity(props: {
// eslint-disable-next-line react-hooks/rules-of-hooks
const updatedBets = mode === 'only-recent' ? undefined : useBets(contract.id)
const bets = updatedBets ?? props.bets
const bets = (updatedBets ?? props.bets).filter((bet) => !bet.isRedemption)
const items =
mode === 'only-recent'