From a982b86cfe62b25d242be8043d062d90d2c3b6f5 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 3 May 2022 12:18:37 -0400 Subject: [PATCH] $300 ante for free daily markets --- functions/src/create-contract.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/src/create-contract.ts b/functions/src/create-contract.ts index ae7b0ad8..e531e1b3 100644 --- a/functions/src/create-contract.ts +++ b/functions/src/create-contract.ts @@ -72,7 +72,6 @@ export const createContract = functions ) return { status: 'error', message: 'Invalid initial probability' } - const ante = FIXED_ANTE // data.ante // uses utc time on server: const today = new Date().setHours(0, 0, 0, 0) const userContractsCreatedTodaySnapshot = await firestore @@ -82,6 +81,8 @@ export const createContract = functions .get() const isFree = userContractsCreatedTodaySnapshot.size === 0 + const ante = isFree ? 300 : FIXED_ANTE // data.ante + if ( ante === undefined || ante < MINIMUM_ANTE ||