From f5ab60b2df218bd53a886f98514f9a1b7a03ebcd Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 20 Feb 2022 17:02:00 -0600 Subject: [PATCH] You can sell your ante on a new answer. Minimum is M$ 1 instead of M$ 10 --- functions/src/create-answer.ts | 2 +- web/components/answers/create-answer-panel.tsx | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/functions/src/create-answer.ts b/functions/src/create-answer.ts index bcb25b03..d18a5a2a 100644 --- a/functions/src/create-answer.ts +++ b/functions/src/create-answer.ts @@ -94,7 +94,7 @@ export const createAnswer = functions.runWith({ minInstances: 1 }).https.onCall( const { newBet, newPool, newTotalShares, newTotalBets, newBalance } = getNewMultiBetInfo(user, answerId, amount, contract, newBetDoc.id) - transaction.create(newBetDoc, { ...newBet, isAnte: true }) + transaction.create(newBetDoc, newBet) transaction.update(contractDoc, { pool: newPool, totalShares: newTotalShares, diff --git a/web/components/answers/create-answer-panel.tsx b/web/components/answers/create-answer-panel.tsx index 36eb1a7b..934310e4 100644 --- a/web/components/answers/create-answer-panel.tsx +++ b/web/components/answers/create-answer-panel.tsx @@ -93,15 +93,13 @@ export function CreateAnswerPanel(props: { contract: Contract }) { {text && ( <> -
- Ante (cannot be sold) -
+
Buy amount
@@ -137,7 +135,7 @@ export function CreateAnswerPanel(props: { contract: Contract }) { disabled={!canSubmit} onClick={submitAnswer} > - Submit answer & bet + Submit answer & buy ) : ( text && (