From aef14e49bbfd2b6c503b6e89f8026766751d9de1 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 15 Aug 2022 21:32:53 -0500 Subject: [PATCH] Update bet type to explain dpm props --- common/bet.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/common/bet.ts b/common/bet.ts index 56e050a7..3d9d6a5a 100644 --- a/common/bet.ts +++ b/common/bet.ts @@ -14,19 +14,21 @@ export type Bet = { probBefore: number probAfter: number - sale?: { - amount: number // amount user makes from sale - betId: string // id of bet being sold - // TODO: add sale time? - } - fees: Fees - isSold?: boolean // true if this BUY bet has been sold isAnte?: boolean isLiquidityProvision?: boolean isRedemption?: boolean challengeSlug?: string + + // Props for bets in DPM contract below. + // A bet is either a BUY or a SELL that sells all of a previous buy. + isSold?: boolean // true if this BUY bet has been sold + // This field marks a SELL bet. + sale?: { + amount: number // amount user makes from sale + betId: string // id of BUY bet being sold + } } & Partial export type NumericBet = Bet & {