From 9b6e551bad53bc3df4021163daf4b0db8c4832ed Mon Sep 17 00:00:00 2001 From: Milli Date: Wed, 25 May 2022 17:38:56 +0200 Subject: [PATCH] Removed 'automatic' resolution --- common/contract.ts | 6 +++--- common/new-contract.ts | 1 + functions/src/create-contract.ts | 2 +- web/pages/create.tsx | 11 ----------- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/common/contract.ts b/common/contract.ts index e7bb7a60..0ba3624b 100644 --- a/common/contract.ts +++ b/common/contract.ts @@ -28,7 +28,7 @@ export type FullContract< isResolved: boolean resolutionTime?: number // When the contract creator resolved the market resolution?: string - resolutionType: 'manual' | 'combined' | 'automatic' + resolutionType: 'manual' | 'combined' closeEmailsSent?: number @@ -98,9 +98,9 @@ export type Numeric = { } export type outcomeType = 'BINARY' | 'MULTI' | 'FREE_RESPONSE' | 'NUMERIC' -export type resolutionType = 'MANUAL' | 'COMBINED' | 'AUTOMATIC' +export type resolutionType = 'MANUAL' | 'COMBINED' export const OUTCOME_TYPES = ['BINARY', 'MULTI', 'FREE_RESPONSE', 'NUMERIC'] -export const RESOLUTION_TYPES = ['MANUAL', 'COMBINED', 'AUTOMATIC'] +export const RESOLUTION_TYPES = ['MANUAL', 'COMBINED'] export const MAX_QUESTION_LENGTH = 480 export const MAX_DESCRIPTION_LENGTH = 10000 diff --git a/common/new-contract.ts b/common/new-contract.ts index bb4109f7..0f7db794 100644 --- a/common/new-contract.ts +++ b/common/new-contract.ts @@ -64,6 +64,7 @@ export function getNewContract( isResolved: false, createdTime: Date.now(), closeTime, + resolutionType: 'manual', volume: 0, volume24Hours: 0, diff --git a/functions/src/create-contract.ts b/functions/src/create-contract.ts index 526b844a..b65e8bb0 100644 --- a/functions/src/create-contract.ts +++ b/functions/src/create-contract.ts @@ -142,11 +142,11 @@ export const createContract = newEndpoint(['POST'], async (req, _res) => { ante, closeTime, tags ?? [], + resolutionType, NUMERIC_BUCKET_COUNT, min ?? 0, max ?? 0, manaLimitPerUser ?? 0, - resolutionType, ) if (!isFree && ante) await chargeUser(creator.id, ante, true) diff --git a/web/pages/create.tsx b/web/pages/create.tsx index 1634c074..d39fc095 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -396,17 +396,6 @@ export function NewContract(props: { question: string; tag?: string }) { /> Combined (experimental) -