You can sell your ante on a new answer. Minimum is M$ 1 instead of M$ 10
This commit is contained in:
parent
8580698c15
commit
f5ab60b2df
|
@ -94,7 +94,7 @@ export const createAnswer = functions.runWith({ minInstances: 1 }).https.onCall(
|
||||||
const { newBet, newPool, newTotalShares, newTotalBets, newBalance } =
|
const { newBet, newPool, newTotalShares, newTotalBets, newBalance } =
|
||||||
getNewMultiBetInfo(user, answerId, amount, contract, newBetDoc.id)
|
getNewMultiBetInfo(user, answerId, amount, contract, newBetDoc.id)
|
||||||
|
|
||||||
transaction.create(newBetDoc, { ...newBet, isAnte: true })
|
transaction.create(newBetDoc, newBet)
|
||||||
transaction.update(contractDoc, {
|
transaction.update(contractDoc, {
|
||||||
pool: newPool,
|
pool: newPool,
|
||||||
totalShares: newTotalShares,
|
totalShares: newTotalShares,
|
||||||
|
|
|
@ -93,15 +93,13 @@ export function CreateAnswerPanel(props: { contract: Contract }) {
|
||||||
{text && (
|
{text && (
|
||||||
<>
|
<>
|
||||||
<Col className="gap-2 mt-1">
|
<Col className="gap-2 mt-1">
|
||||||
<div className="text-gray-500 text-sm">
|
<div className="text-gray-500 text-sm">Buy amount</div>
|
||||||
Ante (cannot be sold)
|
|
||||||
</div>
|
|
||||||
<AmountInput
|
<AmountInput
|
||||||
amount={betAmount}
|
amount={betAmount}
|
||||||
onChange={setBetAmount}
|
onChange={setBetAmount}
|
||||||
error={amountError}
|
error={amountError}
|
||||||
setError={setAmountError}
|
setError={setAmountError}
|
||||||
minimumAmount={10}
|
minimumAmount={1}
|
||||||
disabled={isSubmitting}
|
disabled={isSubmitting}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
@ -137,7 +135,7 @@ export function CreateAnswerPanel(props: { contract: Contract }) {
|
||||||
disabled={!canSubmit}
|
disabled={!canSubmit}
|
||||||
onClick={submitAnswer}
|
onClick={submitAnswer}
|
||||||
>
|
>
|
||||||
Submit answer & bet
|
Submit answer & buy
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
text && (
|
text && (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user