Avalanche NFT Metadata property null on response object

Calling getNFTs when connected to Avalanche C-Chain returns null metatdata property. Code:

Moralis.Web3API.account.getNFTs(options).then((nfts) => {

}); 
{
  "token_address": "0xc0eef2bac6469bd1c89796e712349a1df2dc1298",
  "token_id": "10626",
  "amount": "1",
  "owner_of": "0xfdcb5bd23433dddd0630d6f9745cd1b9a252067a",
  "block_number": "5444658",
  "block_number_minted": "5393059",
  "contract_type": "ERC721",
  "token_uri": "https://ipfs.moralis.io:2053/ipfs/bafybeiecpdwwa33b26fsozyk2nv4zdlm43nlei3ax6itjhz3avrrxoiud4/10626",
  "metadata": null,
  "synced_at": "2021-10-16T20:59:25.503Z",
  "name": "AVAXBLOBS",
  "symbol": "AVAXBLOBS"
}

image

Yep, it looks like the metadata is not there, you could still get it now by accessing that token_uri url

metatdata is populated on Ethereum chain, is this not supported on Avalanche?

I tried fetching the token_uri clientside but ran into issues with CORS not allowing the requestโ€ฆ I was hoping this would be supported the same across all chains.

You can fetch token_uri from a cloud function, when testing on localhost you can get those CORS errors.

Ah yeah that would work, Iโ€™ll give it a shot. thanks!

you could use a cloud function like in this post: NFTOwners beforesave function failing after update