Skip to content

Commit

Permalink
Updating formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 1, 2024
1 parent c46bd76 commit 110f8df
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/nns/src/utils/neurons.utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Vote } from "../enums/governance.enums";
import type { NeuronId } from "../types/common";
import type {
Ballot,
NeuronInfo,
Expand All @@ -8,13 +7,12 @@ import type {

const getNeuronVoteForProposal = ({
proposal: { ballots },
neuron: {neuronId},
neuron: { neuronId },
}: {
proposal: ProposalInfo;
neuron: NeuronInfo;
}): Vote | undefined => ballots.find(
({ neuronId: id }) => id === neuronId,
)?.vote;
}): Vote | undefined =>
ballots.find(({ neuronId: id }) => id === neuronId)?.vote;

/**
* Filter the neurons that are ineligible to vote to a proposal.
Expand Down Expand Up @@ -63,7 +61,8 @@ export const votableNeurons = ({
}: {
neurons: NeuronInfo[];
proposal: ProposalInfo;
}): NeuronInfo[] => neurons.filter(
}): NeuronInfo[] =>
neurons.filter(
(neuron: NeuronInfo) =>
getNeuronVoteForProposal({ proposal, neuron }) === Vote.Unspecified &&
ineligibleNeurons({ neurons, proposal }).find(
Expand Down

0 comments on commit 110f8df

Please sign in to comment.