-
Notifications
You must be signed in to change notification settings - Fork 29
Minimum Stake validation #118
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
Conversation
Create a hook that fetches the min stake amount if needed and saves in a redux store. If a value already exists in redux store a hook will return a value from redux store, otherwise fetches the value from chain.
Allow to set the placeholder for input and the required minimum amout to submit a form.
Set the placeholder with format `Minimum stake <amount> T`. Add validation for minimum amount- the minimum stake amount is required to stake in T network. Currently it is `40,000 T`.
|
Preview uploaded to https://preview.dashboard.test.threshold.network/min-stake-validation/index.html. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Left some small comments (one non-blocking)
Fetch minimum stake from chain only if the t staking contract is not null.
|
Preview uploaded to https://preview.dashboard.test.threshold.network/min-stake-validation/index.html. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Minimum Stake validation This PR adds validation to the staking form. To stake in T network the minimum stake amount is required. Currently it is 40,000 T. Main changes: - set the placeholder for input in staking form- Minimum stake <amount> T, - create a hook that returns the min stake amount- it fetches the min stake amount if needed and saves in a redux store. If a value already exists in redux store a hook will return a value from redux store, otherwise fetches the value from chain, - update the TokenAmountForm - allow to set the placeholder for an input and set the required minimum amount to submit a form.
Closes: #103
Depends on: #117
This PR adds validation to the staking form. To stake in T network the minimum stake amount is required. Currently it is
40,000 T.Main changes:
Minimum stake <amount> T,TokenAmountForm- allow to set the placeholder for an input and set the required minimum amount to submit a form.