Find multiple choice resolution texts as well

This commit is contained in:
Ian Philips 2022-09-13 07:54:37 -06:00
parent 8b1776fe3b
commit 55b895146b

View File

@ -166,7 +166,10 @@ export const resolvemarket = newEndpoint(opts, async (req, auth) => {
(bets) => getContractBetMetrics(contract, bets).invested (bets) => getContractBetMetrics(contract, bets).invested
) )
let resolutionText = outcome ?? contract.question let resolutionText = outcome ?? contract.question
if (contract.outcomeType === 'FREE_RESPONSE') { if (
contract.outcomeType === 'FREE_RESPONSE' ||
contract.outcomeType === 'MULTIPLE_CHOICE'
) {
const answerText = contract.answers.find( const answerText = contract.answers.find(
(answer) => answer.id === outcome (answer) => answer.id === outcome
)?.text )?.text