You can sell your ante on a new answer. Minimum is M$ 1 instead of M$ 10

This commit is contained in:
James Grugett 2022-02-20 17:02:00 -06:00
parent 8580698c15
commit f5ab60b2df
2 changed files with 4 additions and 6 deletions

View File

@ -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,

View File

@ -93,15 +93,13 @@ export function CreateAnswerPanel(props: { contract: Contract }) {
{text && (
<>
<Col className="gap-2 mt-1">
<div className="text-gray-500 text-sm">
Ante (cannot be sold)
</div>
<div className="text-gray-500 text-sm">Buy amount</div>
<AmountInput
amount={betAmount}
onChange={setBetAmount}
error={amountError}
setError={setAmountError}
minimumAmount={10}
minimumAmount={1}
disabled={isSubmitting}
/>
</Col>
@ -137,7 +135,7 @@ export function CreateAnswerPanel(props: { contract: Contract }) {
disabled={!canSubmit}
onClick={submitAnswer}
>
Submit answer & bet
Submit answer & buy
</button>
) : (
text && (