Expose multiple choice answer probabilities (#939)
* Expose multiple choice answer probabilities * Run prettier * Update api.md Co-authored-by: Austin Chen <akrolsmir@gmail.com>
This commit is contained in:
parent
2d1fd07834
commit
1e6b72059e
|
@ -411,7 +411,7 @@ Requires no authorization.
|
|||
type FullMarket = LiteMarket & {
|
||||
bets: Bet[]
|
||||
comments: Comment[]
|
||||
answers?: Answer[] // Free response markets only
|
||||
answers?: Answer[] // dpm-2 markets only
|
||||
description: JSONContent // Rich text content. See https://tiptap.dev/guide/output#option-1-json
|
||||
textDescription: string // string description without formatting, images, or embeds
|
||||
}
|
||||
|
|
|
@ -149,7 +149,8 @@ export function toFullMarket(
|
|||
): FullMarket {
|
||||
const liteMarket = toLiteMarket(contract)
|
||||
const answers =
|
||||
contract.outcomeType === 'FREE_RESPONSE'
|
||||
contract.outcomeType === 'FREE_RESPONSE' ||
|
||||
contract.outcomeType === 'MULTIPLE_CHOICE'
|
||||
? contract.answers.map((answer) =>
|
||||
augmentAnswerWithProbability(contract, answer)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user