remove batching for antes for numeric markets

This commit is contained in:
mantikoros 2022-05-06 14:49:24 -04:00
parent 58db0edd11
commit 899244bd3f

View File

@ -188,18 +188,16 @@ export const createContract = functions
ante ante
) )
await firestore.runTransaction(async (transaction) => { for (let i = 0; i < antes.length; i++) {
for (let anteBet of antes) { const anteBetDoc = firestore
const anteBetDoc = firestore .collection(`contracts/${contract.id}/bets`)
.collection(`contracts/${contract.id}/bets`) .doc()
.doc()
await transaction.set(anteBetDoc, { await anteBetDoc.set({
id: anteBetDoc.id, id: anteBetDoc.id,
...anteBet, ...antes[i],
}) })
} }
})
} }
} }