From 39ebf7997878aa4bedada9ea6b27d93036a6a9b4 Mon Sep 17 00:00:00 2001
From: James Grugett <jahooma@gmail.com>
Date: Thu, 28 Apr 2022 00:46:29 -0400
Subject: [PATCH] Remove contract's lastUpdatedTime

---
 common/contract.ts                           | 1 -
 common/new-contract.ts                       | 1 -
 web/components/feed/find-active-contracts.ts | 6 +-----
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/common/contract.ts b/common/contract.ts
index 8aad82fe..ecad95bd 100644
--- a/common/contract.ts
+++ b/common/contract.ts
@@ -20,7 +20,6 @@ export type FullContract<
   visibility: 'public' | 'unlisted'
 
   createdTime: number // Milliseconds since epoch
-  lastUpdatedTime: number // If the question or description was changed
   lastBetTime?: number
   lastCommentTime?: number
   closeTime?: number // When no more trading is allowed
diff --git a/common/new-contract.ts b/common/new-contract.ts
index ffd27e3f..b86ebb71 100644
--- a/common/new-contract.ts
+++ b/common/new-contract.ts
@@ -53,7 +53,6 @@ export function getNewContract(
     visibility: 'public',
     isResolved: false,
     createdTime: Date.now(),
-    lastUpdatedTime: Date.now(),
     closeTime,
 
     volume,
diff --git a/web/components/feed/find-active-contracts.ts b/web/components/feed/find-active-contracts.ts
index 42737f47..6f40806f 100644
--- a/web/components/feed/find-active-contracts.ts
+++ b/web/components/feed/find-active-contracts.ts
@@ -9,11 +9,7 @@ const MAX_ACTIVE_CONTRACTS = 75
 // TODO: Maybe store last activity time directly in the contract?
 // Pros: simplifies this code; cons: harder to tweak "activity" definition later
 function lastActivityTime(contract: Contract) {
-  return Math.max(
-    contract.resolutionTime || 0,
-    contract.lastUpdatedTime,
-    contract.createdTime
-  )
+  return Math.max(contract.resolutionTime || 0, contract.createdTime)
 }
 
 // Types of activity to surface: