diff --git a/common/contract.ts b/common/contract.ts
index 5dceac84..a21dccb1 100644
--- a/common/contract.ts
+++ b/common/contract.ts
@@ -28,9 +28,8 @@ export type FullContract<
isResolved: boolean
resolutionTime?: number // When the market is resolved
resolution?: string
- automaticResolution: resolution
- automaticResolutionTime?: number
-
+ autoResolution: resolution
+ autoResolutionTime: number // When the market will be resolved automatically
closeEmailsSent?: number
volume: number
diff --git a/common/new-contract.ts b/common/new-contract.ts
index 89fd4fb2..ff15467c 100644
--- a/common/new-contract.ts
+++ b/common/new-contract.ts
@@ -24,8 +24,8 @@ export function getNewContract(
ante: number,
closeTime: number,
extraTags: string[],
- automaticResolution: resolution,
- automaticResolutionTime: number,
+ autoResolution: resolution,
+ autoResolutionTime: number,
// used for numeric markets
bucketCount: number,
@@ -62,8 +62,8 @@ export function getNewContract(
isResolved: false,
createdTime: Date.now(),
closeTime,
- automaticResolution,
- automaticResolutionTime,
+ autoResolution,
+ autoResolutionTime,
volume: 0,
volume24Hours: 0,
diff --git a/firestore.rules b/firestore.rules
index feba35d9..2a0f84c8 100644
--- a/firestore.rules
+++ b/firestore.rules
@@ -45,7 +45,7 @@ service cloud.firestore {
match /contracts/{contractId} {
allow read;
allow update: if request.resource.data.diff(resource.data).affectedKeys()
- .hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags']);
+ .hasOnly(['description', 'closeTime', 'tags', 'lowercaseTags', 'autoResolutionTime']);
allow update: if isAdmin();
}
diff --git a/functions/src/create-contract.ts b/functions/src/create-contract.ts
index cc9d43b2..3f924ca1 100644
--- a/functions/src/create-contract.ts
+++ b/functions/src/create-contract.ts
@@ -67,8 +67,8 @@ export const createContract = newEndpoint(['POST'], async (req, [user, _]) => {
;({ initialProb } = validate(binarySchema, req.body)) // leading ; intentional: see above
}
- const automaticResolution = outcomeType == 'BINARY' ? 'MKT' : 'CANCEL'
- const automaticResolutionTime = closeTime.setDate(closeTime.getDate() + 7)
+ const autoResolution = outcomeType == 'BINARY' ? 'MKT' : 'CANCEL'
+ const autoResolutionTime = closeTime.setDate(closeTime.getDate() + 7)
// Uses utc time on server:
const today = new Date()
@@ -109,8 +109,8 @@ export const createContract = newEndpoint(['POST'], async (req, [user, _]) => {
ante,
closeTime.getTime(),
tags ?? [],
- automaticResolution,
- automaticResolutionTime,
+ autoResolution,
+ autoResolutionTime,
NUMERIC_BUCKET_COUNT,
min ?? 0,
max ?? 0
diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx
index a67c702a..36916774 100644
--- a/web/components/contract/contract-details.tsx
+++ b/web/components/contract/contract-details.tsx
@@ -109,7 +109,7 @@ export function ContractDetails(props: {
disabled?: boolean
}) {
const { contract, bets, isCreator, disabled } = props
- const { closeTime, automaticResolutionTime, creatorName, creatorUsername } = contract
+ const { closeTime, autoResolutionTime, creatorName, creatorUsername } = contract
const { volumeLabel, resolvedDate } = contractMetrics(contract)
return (
@@ -157,7 +157,6 @@ export function ContractDetails(props: {
{/* {' - '}{' '} */}