We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In trying to create an NFT from mintNFT I found that there is not way to create a NFT with a supply of 0.
Steps to Repro: Call Mint Nft with a supply of 0. Notice that the maxSupply is set to Null or Undefined
Expected Behavior: The nft is created with maxSupply of 0 so that there cannot be any limited edition prints on it.
There seems to be an issue on line 98 of mintNFT.ts in the creation of a new CreateMasterEdition:
const masterEditionTx = new CreateMasterEdition( { feePayer: wallet.publicKey }, { edition: editionPDA, metadata: metadataPDA, updateAuthority: wallet.publicKey, mint: mint.publicKey, mintAuthority: wallet.publicKey, maxSupply: maxSupply || maxSupply === 0 ? new BN(maxSupply) : null, }, ); the line: maxSupply: maxSupply || maxSupply === 0 ? new BN(maxSupply) : null, will not allow you to set the maxSupply to 0.
should probably be
maxSupply: maxSupply || maxSupply >= 0 ? new BN(maxSupply) : null,
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In trying to create an NFT from mintNFT I found that there is not way to create a NFT with a supply of 0.
Steps to Repro:
Call Mint Nft with a supply of 0.
Notice that the maxSupply is set to Null or Undefined
Expected Behavior:
The nft is created with maxSupply of 0 so that there cannot be any limited edition prints on it.
There seems to be an issue on line 98 of mintNFT.ts in the creation of a new CreateMasterEdition:
const masterEditionTx = new CreateMasterEdition(
{ feePayer: wallet.publicKey },
{
edition: editionPDA,
metadata: metadataPDA,
updateAuthority: wallet.publicKey,
mint: mint.publicKey,
mintAuthority: wallet.publicKey,
maxSupply: maxSupply || maxSupply === 0 ? new BN(maxSupply) : null,
},
);
the line:
maxSupply: maxSupply || maxSupply === 0 ? new BN(maxSupply) : null,
will not allow you to set the maxSupply to 0.
should probably be
maxSupply: maxSupply || maxSupply >= 0 ? new BN(maxSupply) : null,
The text was updated successfully, but these errors were encountered: