From 55b895146b53ccf257698e9c97ca5cd565cfc3d5 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Tue, 13 Sep 2022 07:54:37 -0600 Subject: [PATCH] Find multiple choice resolution texts as well --- functions/src/resolve-market.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/src/resolve-market.ts b/functions/src/resolve-market.ts index 015ac72f..b867b609 100644 --- a/functions/src/resolve-market.ts +++ b/functions/src/resolve-market.ts @@ -166,7 +166,10 @@ export const resolvemarket = newEndpoint(opts, async (req, auth) => { (bets) => getContractBetMetrics(contract, bets).invested ) let resolutionText = outcome ?? contract.question - if (contract.outcomeType === 'FREE_RESPONSE') { + if ( + contract.outcomeType === 'FREE_RESPONSE' || + contract.outcomeType === 'MULTIPLE_CHOICE' + ) { const answerText = contract.answers.find( (answer) => answer.id === outcome )?.text