-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix: bugs in amount field, disable unlock button without any tokens #95
Conversation
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Branch preview✅ Deploy successful! https://fix_non_positive_amounts--governance.review-react-br.5afe.dev |
@@ -56,6 +56,9 @@ export const UnlockTokenWidget = ({ | |||
if (parsed.gt(currentlyLocked ?? '0')) { | |||
return 'Amount exceeds locked tokens' | |||
} | |||
if (parsed.lte(0)) { | |||
return 'Amount needs to be greater zero' |
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.
return 'Amount needs to be greater zero' | |
return 'Amount must be greater than zero' |
@@ -78,6 +78,9 @@ export const LockTokenWidget = ({ safeBalance }: { safeBalance: BigNumberish | u | |||
if (parsed.gt(safeBalance ?? '0')) { | |||
return 'Amount exceeds balance' | |||
} | |||
if (parsed.lte(0)) { | |||
return 'Amount needs to be greater zero' |
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.
return 'Amount needs to be greater zero' | |
return 'Amount must be greater than zero' |
What this PR fixes