solana-mobile / Minty-fresh

An open source mobile first implementation of NFT minting on solana
https://solanamobile.com/
Apache License 2.0
45 stars 18 forks source link

Fix "Name too long" error #384

Closed Funkatronics closed 1 year ago

Funkatronics commented 1 year ago

Summary

fixes this error, caused by the on chain NFT name exceeding 32 bytes.

The NFT name that is stored in the on chain Metaplex NFT Metadata account must be 32 bytes or less. We currently limit the NFT title input field to 32 characters, not bytes. This PR truncates the on chain name to 32 bytes. The off chain metadata still shows the full name, so wallets etc will still display the full name. Only the on chain data is truncated.