Skip to content
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

Can't disable royalties when minting #277

Open
cheesestringer opened this issue Apr 22, 2022 · 0 comments
Open

Can't disable royalties when minting #277

cheesestringer opened this issue Apr 22, 2022 · 0 comments

Comments

@cheesestringer
Copy link

cheesestringer commented Apr 22, 2022

Trying to mint an NFT with a royalty_percentage of 0 blocks the user with an error message of:

image

Checking the tutorial it seems 0 is an allowed value to disable royalties.

An integer from 0 - 10 describing the amount of royalty to be collected by the creator each time the NFT is sold. For example, if a creator mints an NFT with a royalty percentage of 10, the creator will receive 10% of the proceeds of every sale. Royalties are distributed to creators at the end of each month. If an NFT is minted with a royalty percentage of 0, no royalties will be collected.

Due to the royaltyPercentage falsy check in the updateBtnStatus function in useNFTMint.ts this is currently failing:

!error &&
   nftMintValue.royaltyPercentage && // 0 is falsy so fails early
   Number.isInteger(nftMintValue.royaltyPercentage / 1) &&
   nftMintValue.royaltyPercentage >= 0 &&
   nftMintValue.royaltyPercentage <= 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@cheesestringer and others