Skip to content

Commit

Permalink
Disable adding new answers
Browse files Browse the repository at this point in the history
  • Loading branch information
jahooma committed Jul 13, 2023
1 parent bf8e75b commit 0e70603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions backend/api/src/create-answer-cpmm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export const createanswercpmm = authEndpoint(async (req, auth) => {
const { contractId, text } = validate(bodySchema, req.body)
console.log('Received', contractId, text)

if (true) {
throw new APIError(500, 'This endpoint is disabled for now.')
}

// Run as transaction to prevent race conditions.
const answer = await firestore.runTransaction(async (transaction) => {
const contractDoc = firestore.doc(`contracts/${contractId}`)
Expand Down
6 changes: 2 additions & 4 deletions web/components/contract/contract-description.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ function ContractActions(props: {
buttonColor={'gray'}
/>
)}
{!isOnlyTrustworthy && contract.mechanism === 'cpmm-multi-1' && (
<AddAnswerButton buttonColor={'gray'} setEditing={setEditingAnswer} />
)}
{contract.outcomeType !== 'STONK' && contract.mechanism !== 'none' && (
<Button
color={highlightResolver ? 'red' : 'gray'}
Expand Down Expand Up @@ -199,7 +196,8 @@ function EditDescriptionButton(props: {
)
}

function AddAnswerButton(props: {
// Disabled for now, until we support an Other answer.
function _AddAnswerButton(props: {
setEditing: (editing: boolean) => void
buttonColor?: ColorType
}) {
Expand Down

3 comments on commit 0e70603

@vercel
Copy link

@vercel vercel bot commented on 0e70603 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-mantic.vercel.app
docs-git-main-mantic.vercel.app
docs-pi-teal.vercel.app
docs.manifold.markets

@vercel
Copy link

@vercel vercel bot commented on 0e70603 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 0e70603 Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dev – ./web

dev-manifold.vercel.app
dev-mantic.vercel.app
dev.manifold.markets
dev-git-main-mantic.vercel.app

Please sign in to comment.