Skip to content

Commit

Permalink
Update packages/shared/src/lib/contexts/governance/utils/getNumberOfA…
Browse files Browse the repository at this point in the history
…ctiveProposals.ts

Co-authored-by: Mark Nardi <[email protected]>
  • Loading branch information
Tuditi and MarkNerdi authored Apr 28, 2024
1 parent 3eae152 commit 4ca65a2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { getL1Network } from '@core/network'

export function getNumberOfActiveProposals(): number {
const proposals = get(registeredProposalsForSelectedAccount)
const { currentMilestone } = getL1Network()
const currentMilestone = get(getL1Network().currentMilestone)
const activeProposals = Object.values(proposals ?? {}).filter((proposal) => {
const { status } = getProposalWithStatus(proposal, get(currentMilestone))
const { status } = getProposalWithStatus(proposal,currentMilestone)
return isProposalActive(status)
})
return activeProposals.length
Expand Down

0 comments on commit 4ca65a2

Please sign in to comment.