added automatic resolution to contract

This commit is contained in:
Milli 2022-05-25 22:18:11 +02:00
parent 831591b080
commit a95b9909fe
2 changed files with 4 additions and 2 deletions

View File

@ -30,6 +30,7 @@ export type FullContract<
resolution?: string
resolutionType: 'manual' | 'combined'
automaticResolutionTime?: number
automaticResolution?: resolution
closeEmailsSent?: number

View File

@ -42,9 +42,10 @@ export function contractUrl(contract: Contract) {
}
export function contractMetrics(contract: Contract) {
const { createdTime, resolutionTime, isResolved } = contract
const { createdTime, resolutionTime, isResolved, automaticResolutionTime } = contract
const createdDate = dayjs(createdTime).format('MMM D')
const automaticResolutionDate = dayjs(automaticResolutionTime).format('MMM D')
const resolvedDate = isResolved
? dayjs(resolutionTime).format('MMM D')
@ -52,7 +53,7 @@ export function contractMetrics(contract: Contract) {
const volumeLabel = `${formatMoney(contract.volume)} bet`
return { volumeLabel, createdDate, resolvedDate }
return { volumeLabel, createdDate, automaticResolutionDate, resolvedDate }
}
export function getBinaryProb(contract: FullContract<any, Binary>) {