Fix float and integer check for metaplex share allocation #776
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Our 4000$ honest mistake
Yesterday we used the Fair Launch Protocol for the first time to launch our collection (I'm a developer on several other projects, but they didn't use the FLP). And it did go well up until we got to mint.
We got the error where it says that the creators shares must equal 100 for the metadata to be valid and that no one will be able to mint.
It's tough ! Because it was the first time we used multiple wallets and had to split the costs (and we had to change it last minute).
It looked like this :
The problem was that the
verify_token_metadata
returned no error when there actually was one. When we checked the rust code, we realised that the share number had to be ofu8
type. No floaties allowed in there !This PR is fixing this by throwing an error when the numbers in
creators[].share
are not integers. I hope this will help someone avoid this mistake in the future.