add resolutionProbability to LiteMarket (#546)

This commit is contained in:
Justin 2022-06-22 18:28:11 -04:00 committed by GitHub
parent 237a6c4d2a
commit 4ea7b6692a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export type Contract<T extends AnyContractType = AnyContractType> = {
isResolved: boolean
resolutionTime?: number // When the contract creator resolved the market
resolution?: string
resolutionProbability?: number,
closeEmailsSent?: number

View File

@ -127,6 +127,7 @@ Requires no authorization.
isResolved: boolean
resolutionTime?: number
resolution?: string
resolutionProbability?: number // Used for BINARY markets resolved to MKT
}
```

View File

@ -36,6 +36,7 @@ export type LiteMarket = {
isResolved: boolean
resolution?: string
resolutionTime?: number
resolutionProbability?: number
}
export type ApiAnswer = Answer & {
@ -73,6 +74,7 @@ export function toLiteMarket(contract: Contract): LiteMarket {
isResolved,
resolution,
resolutionTime,
resolutionProbability,
} = contract
const { p, totalLiquidity } = contract as any
@ -106,6 +108,7 @@ export function toLiteMarket(contract: Contract): LiteMarket {
isResolved,
resolution,
resolutionTime,
resolutionProbability,
})
}