question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Image URLs that are split into arrays in metadata do not render in Nami wallet

See original GitHub issue

I’m having issues with assets not rendering their images correctly which I believe is related to them being an array. The CIP for 721 metadata, it says image can be a URI or an array:

https://github.com/cardano-foundation/CIPs/blob/8b1f2f0900d81d6233e9805442c2b42aa1779d2d/CIP-NFTMetadataStandard.md

"image": <uri | array>,

My IPFS URLs are > 64 chars, so I split them into an array like this:

         image: [
            "ipfs://bafkreighf2nnlrg25yyf7u47gfgexj5jywzuyj6wlvp7uh2ofz2c2jqi",
            "g4"
         ],

However, they fail to render in nami wallet. If I inspect the page, I see that the URL being requested is like:

https://ipfs.blockfrost.dev/ipfs/bafkreighf2nnlrg25yyf7u47gfgexj5jywzuyj6wlvp7uh2ofz2c2jqi,g4

The comma near the end looks suspicious. It looks like this might have been fixed by b19439815d217247a001bb17884bfe0a90ade288 but that shipped in 1.1.3 and I’m using 1.1.5. I wonder if perhaps there’s another place that needs this - perhaps line 47 here? (I’m not sure of the difference between `result.metadata and result.on_chain_metadata):

https://github.com/Berry-Pool/nami-wallet/blob/b19439815d217247a001bb17884bfe0a90ade288/src/ui/app/components/asset.jsx#L41-L48

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13

github_iconTop GitHub Comments

2reactions
DanTupcommented, Sep 12, 2021

Actually, I think this might be a Blockfrost issue:

https://cardano-testnet.blockfrost.io/api/v0/assets/b293e143989c49f1b15b5584e03bc12b26dcd2e693e615d638f052344f76616c506572736f6e343038

{
	"asset": "b293e143989c49f1b15b5584e03bc12b26dcd2e693e615d638f052344f76616c506572736f6e343038",
	"policy_id": "b293e143989c49f1b15b5584e03bc12b26dcd2e693e615d638f05234",
	"asset_name": "4f76616c506572736f6e343038",
	"fingerprint": "asset1fjuxqmcqjdthw8uahjyjx2twm9wpn3h9nw6ycg",
	"quantity": "1",
	"initial_mint_tx_hash": "1c283c1327143d3cccf47d24cf2d7db44734b7389e99e578f06a602d1e210881",
	"mint_or_burn_count": 1,
	"onchain_metadata": {
		"image": "ipfs://bafkreiawd5zzckftdxoalvuqnzolc3cws7b2vn35iotw5bsbc7ffsfyy,cq",
	},
	"metadata": null
}

Comapred to metadata at https://testnet.cardanoscan.io/transaction/1c283c1327143d3cccf47d24cf2d7db44734b7389e99e578f06a602d1e210881?tab=metadata:

         image: [
            "ipfs://bafkreiawd5zzckftdxoalvuqnzolc3cws7b2vn35iotw5bsbc7ffsfyy",
            "cq"
         ],

I’ve sent Blockfrost an email to see if they agree and may fix this.

1reaction
DanTupcommented, Oct 1, 2021

@1000101 yep, that looks correct to me too. My guess is CNFT.io isn’t handling images that are arrays of strings correctly then (and are just taking the first element).

I’ll follow up with them on their ticket. Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

nami-wallet-examples/Multi-Signature.md at master - GitHub
This repository demonstrates useful implementation functions of Nami Wallet for your project. - nami-wallet-examples/Multi-Signature.md at master ...
Read more >
Untitled
Penyakit kapalan, Joe masseria imdb, Piercing no smile como cuidar! ... arraylist to array, State flower of kansas, Tiennent, Media and male body...
Read more >
Untitled
How to get jet black hair to brown, Karts for sale south africa! ... Ford theater parking los angeles, Nami austin walk, Pbsnodes...
Read more >
DlW - River Thames Conditions - Environment Agency - GOV.UK
Vw set tx pin was not declared in this scope, Ufo abduction caught on tape north, ... Rj kunal wife images, Motor websites...
Read more >
minted NFT is shown as solid color of picture in Nami wallet
Try to have the asset_name and name the same: "asset_name": "TestNFT1", "name": "TestNFT1",. For some reason, when they are different, Nami ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found