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

NNS1-3094: Show -/- instead of 0 when neuron count not available #5199

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

dskloetd
Copy link
Contributor

Motivation

To make it clear that the neuron count is not 0 when the user is not signed in or the neurons haven't loaded yet.

Changes

  1. Pass neuronsStore instead of definedNeuronsStore to be able to tell if NNS neurons were loaded.
  2. Filter NNS neurons without valid stake as was previously done in definedNeuronsStore.
  3. Use undefined when the user is not signed in, or neurons haven't loaded, to indicate that neuron count is unavailable.
  4. Render undefined as -/- in the neurons cell.

Tests

  1. Unit tests added.
  2. Tested manually at https://qsgjb-riaaa-aaaaa-aaaga-cai.dskloet-ingress.devenv.dfinity.network/staking/

Todos

  • Add entry to changelog (if necessary).
    not yet

@dskloetd dskloetd marked this pull request as ready for review July 16, 2024 08:50
@dskloetd dskloetd requested a review from a team as a code owner July 16, 2024 08:50
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

Thanks!

@dskloetd dskloetd added this pull request to the merge queue Jul 16, 2024
@dskloetd dskloetd removed this pull request from the merge queue due to a manual request Jul 16, 2024
@dskloetd dskloetd added this pull request to the merge queue Jul 16, 2024
Merged via the queue into main with commit c639711 Jul 16, 2024
40 checks passed
@dskloetd dskloetd deleted the kloet/pt-absent-numbers branch July 16, 2024 09:12
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