-
Notifications
You must be signed in to change notification settings - Fork 54
Show warning when invested amount is not maximum available amount #2288
Conversation
|
Hey @nenadV91 , great changes! Video: https://watch.screencastify.com/v/26mQjbcnGBVjHkz3raJt Also, as I mentioned in #2279 (comment) , it would be nice to change warning's color for the light mode, I think. |
|
||
const ErrorMsgs = { | ||
const Messages = { |
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.
why change the name here, they are more declarative as ErrorMessage
no?
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.
Because its also warnings and not just errors at this point. What do you think?
I don't think such a tiny amount (less than 0.01%) is relevant. I vote for leaving as is.
That will come, @biocom will get there 🤞 |
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.
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.
Nice! all good other than what Leandro mentioned.
make a list of warnings
I would go for that one. For the errors, with one we have enough I believe. But Warnings we should see all the warnings at the same time.
Maybe @annamsgeorge or @avsavsavs want to touch that message. It's used for warning the users when they only make use of part of their claiming opportunity.
@anxolin Updated to an array of warnings |
@nenadV91 Pushed a fix for the style.ts merge conflict, in case it helps. |
@elena-zh Good catch, my mistake, fixed! Maybe later on @michelbio can also take a look at this. |
Can review post merge to address it then. |
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.
Cool
@@ -368,7 +400,15 @@ export default function InvestOption({ claim, optionIndex, openModal, closeModal | |||
</i> | |||
{/* Insufficient balance validation error */} | |||
{inputError && <small>{inputError}</small>} | |||
{inputWarning && <small className="warn">{inputWarning}</small>} | |||
{inputWarnings.length ? ( |
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.
Is not this the same as
{ inputWarnings.length && (... ) }
Summary
If the invested amount is not equal to maximum available amount we show yellow warning text below the input field