ante bets created at same time as contract
This commit is contained in:
parent
431f8d41cf
commit
411a739004
|
@ -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 }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user