Further, we can see that metadata is correctly being pulled in Metamask for our NFTs as we can see the image and token id. Now since the metadata is correctly fetched in Metamask, this should’nt be an issue related to the Blockchain as the metadata format for both ETH & MATIC are the same.
Please share you’re feedback and more information concerning above points.
If it’s showing on Metamask, I have no idea why. Per their documentation, that isn’t currently a supported functionality. I would expect a call to the OpenSea API on polygon to time out (as there shouldn’t be a server listening. Might be an OpenSea testnet that’s public facing?)
Is this something that changed within the past few months? I have some Polygon NFT’s I imported into MetaMask a few months ago, and they worked fine. I tried again today, and now I’m seeing this issue.
I’m not sure I understand why the OpenSea API is needed. The tokenURI() contract function should return everything necessary to display the NFT. Is that the way it used to work?
Going back through GitHub, I think it might have been the commit in metamask-mobile at 6b3448890bc52d4fa2c613f573dbc79cfb93cd98 from two months ago that broke Polygon NFTs. This surmise is based on a couple of hours spent browsing your repository, so I could be way off base.
It looks like ENABLE_OPENSEA_API is a configurable setting, but it doesn’t seem to be exposed anywhere in the UI. If there was a way to set it to OFF, would that make it so that it would use the contract functions instead of the OpenSea API? If so, I will file a feature request to make it configurable.
OpenSea’s V2 API (which supports Polygon) was just recently released, so I’m checking with the team on the specifics on that. Will update this post when I hear back from them.
Your thoughts make perfect sense to me. If you switch to Ethereum Mainnet, you’ll find the “enable OpenSea API” setting under Security and Privacy. But I’m pretty sure that won’t have any effect on Polygon. Might be worth a shot just to see though.
Thanks for the response. I do see the setting when I switch to Ethereum network, but it was already turned off.
Even now it sometimes works and sometimes doesn’t work when I add a Polygon NFT (by “doesn’t work”, I mean it fails to retrieve the metadata and shows the NFT as a black box with Symbol #Token_Id).
Any ideas why it might sometimes be able to retrieve metadata for a Polygon NFT? Reading the rest of this thread, I wouldn’t expect it to ever work, but the fact that it sometimes does gives me hope that there might be a way to make it work consistently.
That’s good news about OpenSea’s V2 API. It has been “coming soon” for like a year now. I don’t see anything about it on their website, but it makes sense that they would give you early access.