-
Notifications
You must be signed in to change notification settings - Fork 619
[Dashboard] Trim whitespace at the end of the input value for claim form #5860
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
[Dashboard] Trim whitespace at the end of the input value for claim form #5860
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5860 +/- ##
=======================================
Coverage 55.19% 55.19%
=======================================
Files 1123 1123
Lines 59622 59622
Branches 5029 5029
=======================================
Hits 32906 32906
Misses 25996 25996
Partials 720 720
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
| const transaction = claimTo({ | ||
| contract, | ||
| to: d.to, | ||
| to: d.to.trim(), |
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.
whitespace is ignored during validation, so it may or may not have whitespace - but its not removed when passing to claimTo.
Always save the trimmed value instead:
onChange: (e) => {
form.setValue('to', e.target.value.trim(), { shouldValidate: true });
}
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.
updated thanks for the review
MananTank
left a comment
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.
please address comments
7de1635 to
c6c33f3
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR enhances the
NFTClaimButtoncomponent by adding address validation and trimming functionality for the recipient address input, improving user experience and input accuracy.Detailed summary
isAddressvalidation for the recipient address.setValuein theuseFormhook to update the input value on change.