From 9076b625e3e04bb3692833fb56b32571f06e7472 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Sat, 28 May 2022 13:43:57 -0500 Subject: [PATCH] numeric bet ante provided by house --- common/antes.ts | 4 ++-- functions/src/create-contract.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/antes.ts b/common/antes.ts index 59142be9..e104796f 100644 --- a/common/antes.ts +++ b/common/antes.ts @@ -116,7 +116,7 @@ export function getFreeAnswerAnte( } export function getNumericAnte( - creator: User, + anteBettorId: string, contract: FullContract, ante: number, newBetId: string @@ -136,7 +136,7 @@ export function getNumericAnte( const anteBet: NumericBet = { id: newBetId, - userId: creator.id, + userId: anteBettorId, contractId: contract.id, amount: ante, allBetAmounts, diff --git a/functions/src/create-contract.ts b/functions/src/create-contract.ts index 42a1c376..e30ba608 100644 --- a/functions/src/create-contract.ts +++ b/functions/src/create-contract.ts @@ -170,7 +170,7 @@ export const createContract = newEndpoint(['POST'], async (req, [user, _]) => { .doc() const anteBet = getNumericAnte( - user, + providerId, contract as FullContract, ante, anteBetDoc.id