nft-gallery icon indicating copy to clipboard operation
nft-gallery copied to clipboard

fix: evm nft missing `animationUrl`

Open hassnian opened this issue 1 year ago • 4 comments

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

CleanShot 2024-08-21 at 11 35 13@2x

Bug, where?

animationUrl is correctly assigned first and the assigned to ''

CleanShot 2024-08-21 at 11 36 22@2x

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;

CleanShot 2024-08-21 at 11 24 48

CleanShot Aug 21

hassnian avatar Aug 21 '24 06:08 hassnian

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Aug 21 '24 06:08 netlify[bot]

@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?

preschian avatar Aug 21 '24 12:08 preschian

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

vikiival avatar Aug 21 '24 13:08 vikiival

issue it's still there https://github.com/kodadot/nft-gallery/issues/10927

deployment missing ?

hassnian avatar Sep 03 '24 05:09 hassnian

Screenshot 2024-09-04 at 12 47 02

Was deployed week ago, afaik anyone from @kodadot/internal-dev has access to the subsquid dashboard :)

I set it as the production

vikiival avatar Sep 04 '24 10:09 vikiival

@hassnian fixed?

vikiival avatar Sep 06 '24 09:09 vikiival

cc @hassnian ?

vikiival avatar Sep 11 '24 10:09 vikiival

@hassnian fixed?

yep

no image tag ✅ CleanShot 2024-09-12 at 09 24 05@2x

nft animation ✅ CleanShot 2024-09-12 at 09 25 16

hassnian avatar Sep 12 '24 04:09 hassnian