-
Notifications
You must be signed in to change notification settings - Fork 621
Added in Royalty #5236
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
Added in Royalty #5236
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| const _setRoyaltyInfoForToken = async () => { | ||
| const promise = setRoyaltyInfoForTokenMutation.mutateAsync( | ||
| form.getValues(), | ||
| ); | ||
| toast.promise(promise, { | ||
| success: "Successfully set royalty info for token", | ||
| error: "Failed to set royalty info for token", | ||
| }); | ||
| }; |
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.
The _setRoyaltyInfoForToken function appears to be dead code and has a potential bug - it attempts to use the form values directly but the form schema doesn't include the required tokenId field that the mutation expects. Consider either removing this unused function or implementing it properly by adding a tokenId input field to the form.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
| name="transferValidator" | ||
| render={({ field }) => ( | ||
| <FormItem className="flex flex-1 flex-col gap-3"> | ||
| <FormLabel>Primary Sale Recipient</FormLabel> |
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.
The label Primary Sale Recipient appears to be a copy/paste error for the transferValidator form field. The label should be Transfer Validator to correctly describe the field's purpose and maintain consistency with the variable name.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
size-limit report 📦
|

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR introduces a new
RoyaltyModulecomponent for managing royalty information and transfer validation for NFTs. It allows users to set and update royalty details and includes a form for inputting the necessary data.Detailed summary
RoyaltyModulecomponent to handle royalty info and transfer validator.RoyaltyInfoFormValuesandRoyaltyModuleFormValuestypes.useReadContractfor fetching default royalty info and transfer validator.setRoyaltyInfoForTokenandupdatefunctions for transaction handling.RoyaltyModuleUIfor rendering the form and handling submissions.react-hook-formfor form state management and validation.toastnotifications for transaction success and failure feedback.