Expose multiple choice answer probabilities

This commit is contained in:
Olivia Appleton 2022-09-27 01:36:07 -04:00
parent 21c7130d3b
commit 927c19abc4
No known key found for this signature in database
GPG Key ID: AF65A9CA0FF7FD69
2 changed files with 2 additions and 2 deletions

View File

@ -408,7 +408,7 @@ Requires no authorization.
type FullMarket = LiteMarket & { type FullMarket = LiteMarket & {
bets: Bet[] bets: Bet[]
comments: Comment[] comments: Comment[]
answers?: Answer[] answers?: Answer[] // dpm-2 markets only
description: JSONContent // Rich text content. See https://tiptap.dev/guide/output#option-1-json description: JSONContent // Rich text content. See https://tiptap.dev/guide/output#option-1-json
textDescription: string // string description without formatting, images, or embeds textDescription: string // string description without formatting, images, or embeds
} }

View File

@ -149,7 +149,7 @@ export function toFullMarket(
): FullMarket { ): FullMarket {
const liteMarket = toLiteMarket(contract) const liteMarket = toLiteMarket(contract)
const answers = const answers =
contract.outcomeType === 'FREE_RESPONSE' (contract.outcomeType === 'FREE_RESPONSE') || (contract.outcomeType === 'MULTIPLE_CHOICE')
? contract.answers.map((answer) => ? contract.answers.map((answer) =>
augmentAnswerWithProbability(contract, answer) augmentAnswerWithProbability(contract, answer)
) )