nft-gallery
nft-gallery copied to clipboard
fix: evm nft missing `animationUrl`
PR Type
- [x] Bugfix
- [ ] Feature
- [ ] Refactoring
Context
- [x] Closes #10875
- [x] Closes #10736
https://github.com/kodadot/nft-gallery/pull/9990 added code that fetches the nft.metadata if nft.metadata !== nft.meta.id
@preschian @vikiival did we solve the main issue? can this be removed , or any other solution?
this on evm will always be triggered, unnecessarily refetching the same data
Bug, where?
animationUrl is correctly assigned first and the assigned to ''
Did your issue had any of the "$" label on it?
- [x] Fill up your DOT address: Payout
Screenshot 📸
- [x] My fix has changed something on UI;
Deploy Preview for koda-canary ready!
| Name | Link |
|---|---|
| Latest commit | 1a852c7f6fc9b46f9c414ed0baa0264ffc780d2b |
| Latest deploy log | https://app.netlify.com/sites/koda-canary/deploys/66c58b81e5953400082b7780 |
| Deploy Preview | https://deploy-preview-10874--koda-canary.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
@preschian @vikiival did we solve the main issue? can this be removed , or any other solution?
I don't think we can remove this line for AssetsHub, since animationUrl is optional. If we only rely on data from meta.animation_url from the indexer, there's a possibility it will return null. So, if meta.id doesn't match metadata, it will fetch the original metadata to get the animation_url. Otherwise, it will get the data directly from the indexer.
As far as I know, meta.id and metadata should be the same, at least in the AssetsHub indexer. I just noticed that EVM has a slightly different method. Maybe Vik has new ideas about that?
Currently the id of the metadata field is md5(id)
The reason behind this decision was that some urls some urls were failing to "be" primary key for metadata table. As I believe this wont be a case anymore (since we hanle only ours).
If can one pf you open PR to change this from id: md5(id) to id I am happy to release it.
https://github.com/kodadot/basick/blob/6aee5455416157881276a3efe7ef388812fe8d00/src/mappings/shared/metadata.ts#L26
issue it's still there https://github.com/kodadot/nft-gallery/issues/10927
deployment missing ?
Was deployed week ago, afaik anyone from @kodadot/internal-dev has access to the subsquid dashboard :)
I set it as the production
@hassnian fixed?
cc @hassnian ?
@hassnian fixed?
yep
no image tag ✅
nft animation ✅