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

Load minimum stake when staking from staking table #5413

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

dskloetd
Copy link
Contributor

@dskloetd dskloetd commented Sep 6, 2024

Motivation

In #5339 we added the staking button to the staking table.
This opens the SNS staking modal via a different code path, which didn't load the SNS parameters.
This meant that the minimum neuron stake wasn't available.
Instead of requiring the minimum stake to be available, the SnsStakeNeuronModal component happily ignores this and allows the user to try staking any amount.
But if the amount it too small, claiming the neuron after transferring the tokens fails.

This PR makes sure the parameters are loaded.
We should additionally fix SnsStakeNeuronModal to require the minimum stake to be present but that will be a separate PR.

Changes

Make sure the SNS parameters (which include the minimum stake) are loaded before opening the SnsStakeNeuronModal from the Staking page.

Tests

  1. Unit test added.
  2. Tested manually.
  3. Also tested that staking ICP was not affected and already enforced the minimum stake.

Todos

  • Add entry to changelog (if necessary).

@dskloetd dskloetd marked this pull request as ready for review September 6, 2024 07:29
@dskloetd dskloetd requested a review from a team as a code owner September 6, 2024 07:29
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 Sep 6, 2024
Merged via the queue into main with commit cf39cc3 Sep 6, 2024
30 checks passed
@dskloetd dskloetd deleted the kloet/minimum-stake branch September 6, 2024 07:57
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