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

Draft: Don't display confirm following for not votable neurons #6348

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

mstrasinskis
Copy link
Contributor

@mstrasinskis mstrasinskis commented Feb 4, 2025

Motivation

In today's implementation, you can have neurons that are unlocked but have been inactive for so long that the "confirm following" warning appears. This is undesired, so the followee confirmation warning shouldn't be shown if the neuron cannot vote.

This applies to banners, tags, and the neuron activity action field.

Changes

  • Rename shouldDisplayMissingRewardNotification to isNeuronMissingRewardSoon because, with the new rule, it no longer reflects what it does.
  • Add the utility function hasEnoughDissolveDelayToVote.
  • Apply the new utility to soonLosingRewardNeuronsStore to filter out neurons that don't have enough dissolve delay to vote.
  • Use the new utility for missing rewards tag visibility.
  • Use the new utility for NeuronRewardStatusAction field visibility.
  • Use the new utility for ConfirmFollowingBanner visibility.

Tests

  • Add dissolveDelaySeconds to addNeuronWith.
  • Add related to new logic tests.
  • Ensure that other missing rewards related tests have a valid dissolve delay.
  • Tested manually.

Todos

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

@mstrasinskis mstrasinskis marked this pull request as ready for review February 5, 2025 09:04
@mstrasinskis mstrasinskis requested a review from a team as a code owner February 5, 2025 09:04
@dskloetd
Copy link
Contributor

dskloetd commented Feb 5, 2025

There's a lot going on here. Do you think you can split it?

@mstrasinskis mstrasinskis changed the title refactor: rename isNeuronMissingRewardSoon Don't display confirm following for not votable neurons Feb 5, 2025
@mstrasinskis mstrasinskis marked this pull request as draft February 5, 2025 09:36
@mstrasinskis
Copy link
Contributor Author

There's a lot going on here. Do you think you can split it?

Sure, some changes can be split into separate PRs 👍

@mstrasinskis mstrasinskis changed the title Don't display confirm following for not votable neurons Draft: Don't display confirm following for not votable neurons Feb 5, 2025
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