From 4ea7b6692a56c76415a3e153891953657f7e86ad Mon Sep 17 00:00:00 2001 From: Justin <21313833+wasabipesto@users.noreply.github.com> Date: Wed, 22 Jun 2022 18:28:11 -0400 Subject: [PATCH] add resolutionProbability to LiteMarket (#546) --- common/contract.ts | 1 + docs/docs/api.md | 1 + web/pages/api/v0/_types.ts | 3 +++ 3 files changed, 5 insertions(+) diff --git a/common/contract.ts b/common/contract.ts index 8427c84b..dc91a20e 100644 --- a/common/contract.ts +++ b/common/contract.ts @@ -33,6 +33,7 @@ export type Contract = { isResolved: boolean resolutionTime?: number // When the contract creator resolved the market resolution?: string + resolutionProbability?: number, closeEmailsSent?: number diff --git a/docs/docs/api.md b/docs/docs/api.md index 1b2c9e6e..e7e6a341 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -127,6 +127,7 @@ Requires no authorization. isResolved: boolean resolutionTime?: number resolution?: string + resolutionProbability?: number // Used for BINARY markets resolved to MKT } ``` diff --git a/web/pages/api/v0/_types.ts b/web/pages/api/v0/_types.ts index 47671ed4..4909efc9 100644 --- a/web/pages/api/v0/_types.ts +++ b/web/pages/api/v0/_types.ts @@ -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, }) }