Skip to content

Commit

Permalink
Add voting power related fields to NeuronInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrasinskis committed Dec 19, 2024
1 parent 98c893a commit 9e4fe6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/nns/src/canisters/governance/response.converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ export const toNeuronInfo = ({
? neuronInfo.joined_community_fund_timestamp_seconds[0]
: undefined,
retrievedAtTimestampSeconds: neuronInfo.retrieved_at_timestamp_seconds,
/** @deprecated */
votingPower: neuronInfo.voting_power,
votingPowerRefreshedTimestampSeconds : fromNullable(neuronInfo.voting_power_refreshed_timestamp_seconds),
decidingVotingPower : fromNullable(neuronInfo.deciding_voting_power),
potentialVotingPower : fromNullable(neuronInfo.potential_voting_power),
ageSeconds: neuronInfo.age_seconds,
visibility: fromNullable(neuronInfo.visibility) as
| NeuronVisibility
Expand Down
3 changes: 3 additions & 0 deletions packages/nns/src/types/governance_converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ export interface NeuronInfo {
joinedCommunityFundTimestampSeconds: Option<bigint>;
retrievedAtTimestampSeconds: bigint;
votingPower: bigint;
votingPowerRefreshedTimestampSeconds: Option<bigint>;
decidingVotingPower: Option<bigint>;
potentialVotingPower: Option<bigint>;
ageSeconds: bigint;
fullNeuron: Option<Neuron>;
visibility: Option<NeuronVisibility>;
Expand Down

0 comments on commit 9e4fe6c

Please sign in to comment.