$300 ante for free daily markets
This commit is contained in:
parent
14544d064a
commit
a982b86cfe
|
@ -72,7 +72,6 @@ export const createContract = functions
|
||||||
)
|
)
|
||||||
return { status: 'error', message: 'Invalid initial probability' }
|
return { status: 'error', message: 'Invalid initial probability' }
|
||||||
|
|
||||||
const ante = FIXED_ANTE // data.ante
|
|
||||||
// uses utc time on server:
|
// uses utc time on server:
|
||||||
const today = new Date().setHours(0, 0, 0, 0)
|
const today = new Date().setHours(0, 0, 0, 0)
|
||||||
const userContractsCreatedTodaySnapshot = await firestore
|
const userContractsCreatedTodaySnapshot = await firestore
|
||||||
|
@ -82,6 +81,8 @@ export const createContract = functions
|
||||||
.get()
|
.get()
|
||||||
const isFree = userContractsCreatedTodaySnapshot.size === 0
|
const isFree = userContractsCreatedTodaySnapshot.size === 0
|
||||||
|
|
||||||
|
const ante = isFree ? 300 : FIXED_ANTE // data.ante
|
||||||
|
|
||||||
if (
|
if (
|
||||||
ante === undefined ||
|
ante === undefined ||
|
||||||
ante < MINIMUM_ANTE ||
|
ante < MINIMUM_ANTE ||
|
||||||
|
|
Loading…
Reference in New Issue
Block a user