Filter out redemption bets from feed
This commit is contained in:
parent
48df0ac7ce
commit
7cc92b176f
|
@ -821,7 +821,7 @@ export function ContractFeed(props: {
|
||||||
|
|
||||||
let bets = useBets(contract.id) ?? props.bets
|
let bets = useBets(contract.id) ?? props.bets
|
||||||
bets = isBinary
|
bets = isBinary
|
||||||
? bets.filter((bet) => !bet.isAnte)
|
? bets.filter((bet) => !bet.isAnte && !bet.isRedemption)
|
||||||
: bets.filter((bet) => !(bet.isAnte && (bet.outcome as string) === '0'))
|
: bets.filter((bet) => !(bet.isAnte && (bet.outcome as string) === '0'))
|
||||||
|
|
||||||
if (feedType === 'multi') {
|
if (feedType === 'multi') {
|
||||||
|
@ -885,7 +885,9 @@ export function ContractActivityFeed(props: {
|
||||||
|
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
|
||||||
let bets = props.bets.sort((b1, b2) => b1.createdTime - b2.createdTime)
|
let bets = props.bets
|
||||||
|
.filter((bet) => !bet.isAnte && !bet.isRedemption)
|
||||||
|
.sort((b1, b2) => b1.createdTime - b2.createdTime)
|
||||||
comments.sort((c1, c2) => c1.createdTime - c2.createdTime)
|
comments.sort((c1, c2) => c1.createdTime - c2.createdTime)
|
||||||
|
|
||||||
if (contract.outcomeType === 'FREE_RESPONSE') {
|
if (contract.outcomeType === 'FREE_RESPONSE') {
|
||||||
|
|
|
@ -175,7 +175,6 @@ function BetsSection(props: {
|
||||||
bets: Bet[]
|
bets: Bet[]
|
||||||
}) {
|
}) {
|
||||||
const { contract, user } = props
|
const { contract, user } = props
|
||||||
const isBinary = contract.outcomeType === 'BINARY'
|
|
||||||
const bets = useBets(contract.id) ?? props.bets
|
const bets = useBets(contract.id) ?? props.bets
|
||||||
|
|
||||||
// Decending creation time.
|
// Decending creation time.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user