Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IPFS fallback gateways #7

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

hantyrram
Copy link

add ipfs gateways

Copy link

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