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