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

web-wallet: Staking Flow Allows Proceeding with Stake Below Minimum Stake Value #3089

Closed
nortonandreev opened this issue Nov 28, 2024 · 0 comments · Fixed by #3095
Closed
Assignees
Labels
fix:bug Something isn't working module:web-wallet Issues related to web-wallet module

Comments

@nortonandreev
Copy link
Contributor

Description

There is a bug in the Web Wallet where the Staking flow incorrectly allows the user to proceed with a stake value less than the minimum required stake if the spendable amount is also less than the minimum stake value.

It seems the issue is related to how the component is initialized. Specifically, the onMount logic and the related values should be reviewed to ensure proper validation during initialization.

Steps to Reproduce

  1. Modify the spendable value in StakeContract to a value below the minimum stake, e.g.,
    spendable={duskToLux(70)}
  2. Access the Staking flow in the Web Wallet.
  3. Observe that the Next button is enabled even when the stake amount (e.g., 70 DUSK) is below the minimum stake requirement (1,000 DUSK).

Expected Behavior

  • The Next button should be disabled if the entered stake value is less than the minimum required stake (1,000 DUSK).

Actual Behavior

  • The Next button is enabled, allowing the user to proceed with an invalid stake amount.

Potential Cause

The issue may originate from the initialization logic of the component. Specifically, the onMount logic and related values (e.g., minStake and stakeAmount) should be reviewed to ensure they correctly enforce the minimum stake requirement during initialization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix:bug Something isn't working module:web-wallet Issues related to web-wallet module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant