-
Notifications
You must be signed in to change notification settings - Fork 19
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
Enhance the management of 'confirm' button state in components that use TokenSelector & update copy #3151
Conversation
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.
I would get rid of this repeated code. I would make use of "onTokenSelect" callback, as if it was fired && it has token data - it means that its not "loading" anymore (or is not "checking" anymore)
src/modules/dashboard/components/CreateColonyWizard/TokenSelector.tsx
Outdated
Show resolved
Hide resolved
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.
Looks good, I have just one doubt about maintaining same states (hasError
) in 2 components (as per my comment directly in the file)
src/modules/dashboard/components/CreateColonyWizard/StepSelectToken.tsx
Outdated
Show resolved
Hide resolved
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.
I think this looks better now, with single source of truth for both the parent & the child.
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! I quite like these changes 👌
48bba1c
to
f009a69
Compare
Description
This PR adds corrects the behavior of
TokenEditDialog
, and updates the copy to read "Token data not found. Please check the token contract address.".A new callback prop to
TokenSelector
was added to inform the caller of when an address is being searched.Initially,
TokenEditDialog
was enhanced to guard the 'confirm' button when performing verification & validation. But 2 other components (UserTokenEditDialogForm
&StepSelectToken
) that useTokenSelector
also had the same issues, so they were also updated.Before updates:
After updates:
Resolves #3121