Skip to content

add IPFS fallback gateways#7

Open
hantyrram wants to merge 3 commits intomr-zwets:mainfrom
hantyrram:main
Open

add IPFS fallback gateways#7
hantyrram wants to merge 3 commits intomr-zwets:mainfrom
hantyrram:main

Conversation

@hantyrram
Copy link
Copy Markdown

add ipfs gateways

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 28, 2024

Deploy Preview for token-explorer ready!

Name Link
🔨 Latest commit de693f3
🔍 Latest deploy log https://app.netlify.com/sites/token-explorer/deploys/6682a0a4c025090008d6660d
😎 Deploy Preview https://deploy-preview-7--token-explorer.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.

remove ipfsGateway var
@mr-zwets mr-zwets changed the title Update index.tsx add IPFS fallback gateways Jun 28, 2024
@mr-zwets
Copy link
Copy Markdown
Owner

mr-zwets commented Sep 4, 2024

Hi! Thanks for the PR and sorry for the late reply.

Although your changes were quite small I don't understand them properly, especially the useMemo and yield.

For now I just changed the default IPFS gateway to "https://w3s.link/ipfs/"
i also copied your code quality improvement of adding the tokenIconUri as a useEffect hook

I'll leave this PR open to maybe in the future futher investigate having IPFS fallbacks

@hantyrram
Copy link
Copy Markdown
Author

Hi! Thanks for the PR and sorry for the late reply.

  • Sorry also for the late reply

Although your changes were quite small I don't understand them properly, especially the useMemo and yield.

  • This was a quick fix tried not to change much. I used useMemo because the second useEffect that depends on ipfsGateways causes re-render without it. The getIpfsGateway is just a generator, it just yields the first ipfs gateway url that's tested to be accessible.

For now I just changed the default IPFS gateway to "https://w3s.link/ipfs/" i also copied your code quality improvement of adding the tokenIconUri as a useEffect hook

  • If it works please do ignore this PR, w3s was reliable on my previous tests even if it was pinned using Pinata, hopefully it stays that way. 😀

I'll leave this PR open to maybe in the future futher investigate having IPFS fallbacks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants