cardano-community / koios-artifacts

Artifacts for https://koios.rest and https://api.koios.rest websites
Creative Commons Attribution 4.0 International
20 stars 25 forks source link

asset_info: Retrieval of token_registry_metadata is case sensitive #160

Closed maxee closed 1 year ago

maxee commented 1 year ago

Describe the bug When a token is registered in the token registry it appears that the token_registry_metadata is only returned if the provided _asset_name in hex has the same casing as it has in the token registry.

To Reproduce Steps to reproduce the behavior:

  1. Use api.koios.rest
  2. Try to fetch the asset_info of the following token: Policy Id: b6a7467ea1deb012808ef4e87b5ff371e85f7142d7b356a40d9b42a0 tokenName (hex): 436f726e75636f70696173205b76696120436861696e506f72742e696f5d
  3. The token_registry_metadata is set in the response (https://api.koios.rest/api/v0/asset_info?_asset_policy=1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e&_asset_name=776f726c646d6f62696c65746f6b656e)
  4. Repeat step 2 with an upper-cased hex for the tokenName: 436F726E75636F70696173205B76696120436861696E506F72742E696F5D (https://api.koios.rest/api/v0/asset_info?_asset_policy=1d7f33bd23d85e1a25d87d86fac4f199c3197a2f7afeb662a0f34e1e&_asset_name=776F726C646D6F62696C65746F6B656E)
  5. The token_registy_metadata is not set in the response

Expected behavior Casing of the hex string should not matter at all.

This might also affect other API routes

rdlrt commented 1 year ago

Thanks, should be an easy fix, we can add it to 1.0.10