Filter out answers with 0 dollars
This commit is contained in:
parent
f5ab60b2df
commit
20a3966820
|
@ -15,11 +15,11 @@ import { AnswerResolvePanel } from './answer-resolve-panel'
|
|||
|
||||
export function AnswersPanel(props: { contract: Contract; answers: Answer[] }) {
|
||||
const { contract } = props
|
||||
const { creatorId, resolution, resolutions } = contract
|
||||
const { creatorId, resolution, resolutions, pool } = contract
|
||||
|
||||
const answers = useAnswers(contract.id) ?? props.answers
|
||||
const [winningAnswers, otherAnswers] = _.partition(
|
||||
answers.filter((answer) => answer.id !== '0'),
|
||||
answers.filter((answer) => answer.id !== '0' && pool[answer.id] > 0),
|
||||
(answer) =>
|
||||
answer.id === resolution || (resolutions && resolutions[answer.id])
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user