QA: nftproto registration tokenProtocolId validation failures
Closed
QA: nftproto registration tokenProtocolId validation failures
Summary
QA: nftproto register does not validate the new tokenProtocolId according to the rules given in the help
Steps to reproduce
crown-cli nftproto register test01 "Test 01"
Expected behavior
This should fail (contains an illegal 0 character)
Problematic behavior
Protocol is created with Id "test.1"
Crown-core environment info
Ubuntu 16.04
Crown-core application info
Crown version v0.13.9.3-3230ab8a
Relevant logs, dumps and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code; it's very hard to read otherwise.)
Drop full logs & dumps here: https://nextcloud.crownplatform.com/index.php/s/Q6H8enXNmJsQYCD
Possible fixes
(Any comments on what you think might be responsible for the problem, if you have particular insight.)
/cc @artem
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register test01 "Test 01" tCRWPpEZVu93MVGYS9FqEjV9XAW9sgKz3MMTp c45bb455b32d81308067a8d4f5cb285a28e9457debeb525d90fc52b53dd0f417 mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto get test01 { "blockHash" : "cc33e042272ca406e89160cf113876a6ff4d19edc97b05dca9dce95f262e025d", "registrationTxHash" : "c45bb455b32d81308067a8d4f5cb285a28e9457debeb525d90fc52b53dd0f417", "height" : 351802, "timestamp" : 1581602394, "nftProtocolId" : "test.1", "tokenProtocolName" : "Test 01", "tokenMetadataSchemaUri" : "", "tokenMetadataMimeType" : "text/plain", "isTokenTransferable" : true, "isMetadataEmbedded" : false, "nftRegSign" : "SignByCreator", "maxMetadataSize" : 255, "tokenProtocolOwnerId" : "tCRWPpEZVu93MVGYS9FqEjV9XAW9sgKz3MMTp" } mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto get test.1 { "blockHash" : "cc33e042272ca406e89160cf113876a6ff4d19edc97b05dca9dce95f262e025d", "registrationTxHash" : "c45bb455b32d81308067a8d4f5cb285a28e9457debeb525d90fc52b53dd0f417", "height" : 351802, "timestamp" : 1581602394, "nftProtocolId" : "test.1", "tokenProtocolName" : "Test 01", "tokenMetadataSchemaUri" : "", "tokenMetadataMimeType" : "text/plain", "isTokenTransferable" : true, "isMetadataEmbedded" : false, "nftRegSign" : "SignByCreator", "maxMetadataSize" : 255, "tokenProtocolOwnerId" : "tCRWPpEZVu93MVGYS9FqEjV9XAW9sgKz3MMTp" }
mentioned in commit 91ca83d9
mentioned in commit 55929a99
mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register new01 "Test 01 new" tCRWN2Tan4QdmHGfoKYAk8tYkqYqSizwkZEhj error: {"code":-8,"message":"NFT protocol ID contains invalid characters"} mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register new91 "Test 01 new" tCRWN2Tan4QdmHGfoKYAk8tYkqYqSizwkZEhj error: {"code":-8,"message":"NFT protocol ID contains invalid characters"} mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register new81 "Test 01 new" tCRWN2Tan4QdmHGfoKYAk8tYkqYqSizwkZEhj error: {"code":-8,"message":"NFT protocol ID contains invalid characters"} mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register new71 "Test 01 new" tCRWN2Tan4QdmHGfoKYAk8tYkqYqSizwkZEhj error: {"code":-8,"message":"NFT protocol ID contains invalid characters"} mark@x230:~/.crowntest/testnet3$ tcrowncli nftproto register new61 "Test 01 new" tCRWN2Tan4QdmHGfoKYAk8tYkqYqSizwkZEhj error: {"code":-8,"message":"NFT protocol ID contains invalid characters"}
Fixed in v0.13.9.5. Closed.