Skip to content

Commit

Permalink
refactor: fn rename
Browse files Browse the repository at this point in the history
  • Loading branch information
1emu committed Aug 14, 2024
1 parent fb02ebc commit 615db69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/ProjectService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import { ErrorService } from './ErrorService'
import { ProposalInCreation } from './ProposalService'
import { VestingService } from './VestingService'

function newestVestingFirst(a: ProjectInList, b: ProjectInList): number {
function sortByNewestVestingFirst(a: ProjectInList, b: ProjectInList): number {
const startDateSort =
new Date(b.funding?.vesting?.start_at || b.updated_at).getTime() -
new Date(a.funding?.vesting?.start_at || a.updated_at).getTime()
Expand All @@ -56,7 +56,7 @@ export class ProjectService {
const projectsQueryResults = await ProjectModel.getProjectsWithUpdates()
const vestings = await VestingService.getAllVestings()
const updatedProjects = this.getProjectInList(projectsQueryResults, vestings)
return updatedProjects.sort(newestVestingFirst)
return updatedProjects.sort(sortByNewestVestingFirst)
}

private static getProjectInList(
Expand Down

0 comments on commit 615db69

Please sign in to comment.