If a user mint a token with empty tokenMetadata it will still mint. I think this can cause some unexpected problems and need to validate it before storing it
The test below should pass
|
/** @todo fix in the contract **/ |
|
// await test.throwsAsync(async () => { |
|
// await call_mint(contract, alice, { |
|
// tokenMetadata: {}, |
|
// token_royalty: TOKEN_ROYALTY |
|
// }) |
|
// }) |
|
// test.log(`✓ Alice failed to mint without tokenMetadata\n`) |
If a user mint a token with empty
tokenMetadatait will still mint. I think this can cause some unexpected problems and need to validate it before storing itThe test below should pass
contracts/near-workspaces/__tests__/nft.ava.ts
Lines 82 to 89 in c71e2a8