Skip to content

Commit

Permalink
refactor: legacy condition
Browse files Browse the repository at this point in the history
  • Loading branch information
1emu committed Aug 12, 2024
1 parent d2caa9a commit 6d47409
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils/projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ export function getProjectFunding(project: ProjectQueryResult, vesting: Vesting
}

export function getProjectStatus(project: ProjectQueryResult, vesting: VestingWithLogs | undefined): ProjectStatus {
const legacyCondition = !vesting && project.enacted_description
if (project.enacting_tx || legacyCondition) {
const legacyCondition = project.enacting_tx || (!vesting && project.enacted_description)
if (legacyCondition) {
return ProjectStatus.Finished
}

if (!vesting) {
return ProjectStatus.Pending
}

return toGovernanceProjectStatus(vesting.status)
}

Expand Down

0 comments on commit 6d47409

Please sign in to comment.