Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New voting power related fields in NeuronInfo #794

Merged
merged 5 commits into from
Dec 19, 2024

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Dec 19, 2024

Motivation

After introducing new neuron properties (deciding_voting_power and potential_voting_power), the original voting_power field has become obsolete. With this PR, we add three new fields to the NeuronInfo: decidingVotingPower, potentialVotingPower, and a small drive-by addition votingPowerRefreshedTimestampSeconds; and mark the original votingPower field as deprecated.

Changes

  • Added 3 new fields.
  • Mark votingPower as deprecated.

Tests

  • Pass.
  • Tested manually by utilizing new fields in the NNS Dapp.

Todos

  • Add entry to changelog (if necessary).
    Not necessary.

Copy link
Contributor

github-actions bot commented Dec 19, 2024

size-limit report 📦

Path Size
@dfinity/ckbtc 8.11 KB (0%)
@dfinity/cketh 3.68 KB (0%)
@dfinity/cmc 1.41 KB (0%)
@dfinity/ledger-icrc 4.19 KB (0%)
@dfinity/ledger-icp 15.43 KB (0%)
@dfinity/nns 37.02 KB (+0.04% 🔺)
@dfinity/nns-proto 140.98 KB (0%)
@dfinity/sns 16.98 KB (0%)
@dfinity/utils 4.67 KB (0%)
@dfinity/ic-management 3.19 KB (0%)

@mstrasinskis mstrasinskis marked this pull request as ready for review December 19, 2024 08:26
@mstrasinskis mstrasinskis requested review from a team as code owners December 19, 2024 08:26
@mstrasinskis mstrasinskis changed the title Add voting power related fields to NeuronInfo New voting power related fields to NeuronInfo Dec 19, 2024
@mstrasinskis mstrasinskis changed the title New voting power related fields to NeuronInfo New voting power related fields in NeuronInfo Dec 19, 2024
Copy link
Collaborator

@dskloetd dskloetd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tests?

@mstrasinskis
Copy link
Contributor Author

No tests?

Good point @dskloetd, the absence of toNeuronInfo tests is not an excuse for not writing them. I’ve added the tests now.

@mstrasinskis mstrasinskis merged commit d810d76 into main Dec 19, 2024
12 checks passed
@mstrasinskis mstrasinskis deleted the deciding-voting-power branch December 19, 2024 10:15
github-merge-queue bot pushed a commit to dfinity/nns-dapp that referenced this pull request Dec 19, 2024
# Motivation

To access the [new fields](dfinity/ic-js#794) of
the neuron info, we need to upgrade the ic-js version.

# Changes

- `npm run upgrade:next`

# Tests

- Added new fields to the mock NeuronInfo.
- Pass.

# Todos

- [ ] Add entry to changelog (if necessary).
Not necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants