Remove contract's lastUpdatedTime

This commit is contained in:
James Grugett 2022-04-28 00:46:29 -04:00
parent f357b6e92e
commit 39ebf79978
3 changed files with 1 additions and 7 deletions

View File

@ -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

View File

@ -53,7 +53,6 @@ export function getNewContract(
visibility: 'public',
isResolved: false,
createdTime: Date.now(),
lastUpdatedTime: Date.now(),
closeTime,
volume,

View File

@ -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: