Remove contract's lastUpdatedTime
This commit is contained in:
parent
f357b6e92e
commit
39ebf79978
|
@ -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
|
||||
|
|
|
@ -53,7 +53,6 @@ export function getNewContract(
|
|||
visibility: 'public',
|
||||
isResolved: false,
|
||||
createdTime: Date.now(),
|
||||
lastUpdatedTime: Date.now(),
|
||||
closeTime,
|
||||
|
||||
volume,
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user