added automatic resolution to contract
This commit is contained in:
parent
831591b080
commit
a95b9909fe
|
@ -30,6 +30,7 @@ export type FullContract<
|
||||||
resolution?: string
|
resolution?: string
|
||||||
resolutionType: 'manual' | 'combined'
|
resolutionType: 'manual' | 'combined'
|
||||||
automaticResolutionTime?: number
|
automaticResolutionTime?: number
|
||||||
|
automaticResolution?: resolution
|
||||||
|
|
||||||
closeEmailsSent?: number
|
closeEmailsSent?: number
|
||||||
|
|
||||||
|
|
|
@ -42,9 +42,10 @@ export function contractUrl(contract: Contract) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function contractMetrics(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 createdDate = dayjs(createdTime).format('MMM D')
|
||||||
|
const automaticResolutionDate = dayjs(automaticResolutionTime).format('MMM D')
|
||||||
|
|
||||||
const resolvedDate = isResolved
|
const resolvedDate = isResolved
|
||||||
? dayjs(resolutionTime).format('MMM D')
|
? dayjs(resolutionTime).format('MMM D')
|
||||||
|
@ -52,7 +53,7 @@ export function contractMetrics(contract: Contract) {
|
||||||
|
|
||||||
const volumeLabel = `${formatMoney(contract.volume)} bet`
|
const volumeLabel = `${formatMoney(contract.volume)} bet`
|
||||||
|
|
||||||
return { volumeLabel, createdDate, resolvedDate }
|
return { volumeLabel, createdDate, automaticResolutionDate, resolvedDate }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBinaryProb(contract: FullContract<any, Binary>) {
|
export function getBinaryProb(contract: FullContract<any, Binary>) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user