diff --git a/common/contract.ts b/common/contract.ts index 77568f49..6e362de0 100644 --- a/common/contract.ts +++ b/common/contract.ts @@ -38,6 +38,8 @@ export type FullContract< T export type Contract = FullContract +export type BinaryContract = FullContract +export type FreeResponseContract = FullContract export type DPM = { mechanism: 'dpm-2' @@ -61,18 +63,20 @@ export type Binary = { outcomeType: 'BINARY' initialProbability: number resolutionProbability?: number // Used for BINARY markets resolved to MKT + resolution?: 'YES' | 'NO' | 'MKT' | 'CANCEL' } export type Multi = { outcomeType: 'MULTI' multiOutcomes: string[] // Used for outcomeType 'MULTI'. - resolutions?: { [outcome: string]: number } // Used for PROB + resolutions?: { [outcome: string]: number } // Used for MKT resolution. } export type FreeResponse = { outcomeType: 'FREE_RESPONSE' answers: Answer[] // Used for outcomeType 'FREE_RESPONSE'. - resolutions?: { [outcome: string]: number } // Used for PROB + resolution?: string | 'MKT' | 'CANCEL' + resolutions?: { [outcome: string]: number } // Used for MKT resolution. } export type outcomeType = 'BINARY' | 'MULTI' | 'FREE_RESPONSE' diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 4828913c..31d4b688 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -19,7 +19,7 @@ import { Bet } from '../../common/bet' import { placeBet, sellShares } from '../lib/firebase/api-call' import { BuyAmountInput, SellAmountInput } from './amount-input' import { InfoTooltip } from './info-tooltip' -import { OutcomeLabel } from './outcome-label' +import { BinaryOutcomeLabel, OutcomeLabel } from './outcome-label' import { calculatePayoutAfterCorrectBet, calculateShares, @@ -58,7 +58,7 @@ export function BetPanel(props: {
You have {formatWithCommas(Math.floor(shares))}{' '} - shares + shares