-
Notifications
You must be signed in to change notification settings - Fork 9
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
Prevent a larger amount to be calculated #826
Conversation
✅ Deploy Preview for dev-astral ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
PR Reviewer Guide 🔍
|
PR Code Suggestions ✨
|
@DianaPertseva This should fix the shares amount issue and the shares been 0 also |
Unfortunately, I see the same bug on the preview. Sent more info in dms |
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
User description
Prevent a larger amount to be calculated
For a reason I can't understand, it seems sometimes the shares calculated to withdraw are higher than the max shares pass to the component. So I added an extra sanity check, when calculating the % of shares selected * total shares, to ensure it does not exceed the max shares...
PR Type
Bug fix
Description
newAmount
to improve code readability and maintainability.Changes walkthrough 📝
ActionsModal.tsx
Add sanity check for withdrawal shares calculation
explorer/src/components/Staking/ActionsModal.tsx
not exceed the maximum allowed shares.
newAmount
to store the calculated sharesamount.
check.