ante bets created at same time as contract

This commit is contained in:
mantikoros 2022-01-13 10:40:08 -06:00
parent 431f8d41cf
commit 411a739004

View File

@ -30,6 +30,8 @@ export function getAnteBets(
const p = getProbability(contract.totalShares) const p = getProbability(contract.totalShares)
const ante = contract.totalBets.YES + contract.totalBets.NO const ante = contract.totalBets.YES + contract.totalBets.NO
const { createdTime } = contract
const yesBet: Bet = { const yesBet: Bet = {
id: yesAnteId, id: yesAnteId,
userId: creator.id, userId: creator.id,
@ -39,7 +41,7 @@ export function getAnteBets(
outcome: 'YES', outcome: 'YES',
probBefore: p, probBefore: p,
probAfter: p, probAfter: p,
createdTime: Date.now(), createdTime,
} }
const noBet: Bet = { const noBet: Bet = {
@ -51,7 +53,7 @@ export function getAnteBets(
outcome: 'NO', outcome: 'NO',
probBefore: p, probBefore: p,
probAfter: p, probAfter: p,
createdTime: Date.now(), createdTime,
} }
return { yesBet, noBet } return { yesBet, noBet }