Jump to content

Possible Bug Report on API


Razvan Merdescu
 Share

Recommended Posts

Hi! I came across this while playing around with NFTs on the devnet. So it seems that the retrieved NFT object in the API has a wrong name... Here's how to reproduce:

 

Create a new NFT Collection. I already created one, here's the API Request to GET the new collection.:

image.png.0e7cdbd3b0235ba919d91fdad068d345.png

Create a new NFT in this collection.

image.png.84853911c8f9f8fec4a357bd7c5beba8.png

image.thumb.png.437abc96735c256914b0a1625b69e466.png

Send the transaction.

image.png.5027d14baeee6b35cc38dae203a601ba.png

 

Then GET the NFT's via API:

image.thumb.png.491b1afd6f74bdb804bb543d5f1dc257.png

 

Notice how we set the name as "TheRealNFTName" in the creation step. As you can see here. The name of the NFT is actually the name of the collection, not of the NFT itself. The wallet returns the same value (probably because of using the API ) and so does ElrondScan. 

Most probably the API Method to GET NFTs (and GET NFT/{identifier} as it seems to have the same behaviour) actually set the collection name to the final object that is sent as a result. Either that or the Create Method registers the collection name as the NFT name instead. 

 

Or is this just expected behaviour? How do I retrieve the actual NFT name then?

 

Edited by Razvan Merdescu
  • Thanks 1
Link to comment
Share on other sites

  • Elrond Team
19 hours ago, Razvan Merdescu said:

Hi! I came across this while playing around with NFTs on the devnet. So it seems that the retrieved NFT object in the API has a wrong name... Here's how to reproduce:

 

Create a new NFT Collection. I already created one, here's the API Request to GET the new collection.:

image.png.0e7cdbd3b0235ba919d91fdad068d345.png

Create a new NFT in this collection.

image.png.84853911c8f9f8fec4a357bd7c5beba8.png

image.thumb.png.437abc96735c256914b0a1625b69e466.png

Send the transaction.

image.png.5027d14baeee6b35cc38dae203a601ba.png

 

Then GET the NFT's via API:

image.thumb.png.491b1afd6f74bdb804bb543d5f1dc257.png

 

Notice how we set the name as "TheRealNFTName" in the creation step. As you can see here. The name of the NFT is actually the name of the collection, not of the NFT itself. The wallet returns the same value (probably because of using the API ) and so does ElrondScan. 

Most probably the API Method to GET NFTs (and GET NFT/{identifier} as it seems to have the same behaviour) actually set the collection name to the final object that is sent as a result. Either that or the Create Method registers the collection name as the NFT name instead. 

 

Or is this just expected behaviour? How do I retrieve the actual NFT name then?

 

Thanks for reporting!

Indeed there is an error on the name returned, "TE1" is in fact the ticker.

Will be fixed in the following days.

In the meantime please check :

https://docs.elrond.com/developers/esdt-tokens/#get-esdt-token-properties

If you take a look on the response, first element in returnData should be the name, base64 encoded.

 

 

 

  • Like 1
Link to comment
Share on other sites

Posted (edited)

Another small issue which I'd rather not create a new thread for is that api.elrond.com returns a 500 Internal Server Error on these requests :

image.thumb.png.fcbf21cf904b14e58a0ed59abb645f41.png

 

It works on the devnet and testnet, it just doesn't work on the mainnet. 

Unfortunately typescript is not really my cup of tea so I wasn't able to debug this and send a fix on GitHub.

Edited by Razvan Merdescu
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...