Created
March 17, 2021 07:16
-
-
Save zh/07845e259b124e21951b4a09159fe245 to your computer and use it in GitHub Desktop.
Display IPFS images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const waifuPrefix = 'https://icons.waifufaucet.com/original/'; | |
const ipfsPrefix = 'https://ipfs.io/ipfs/'; | |
if (token.symbol.toLowerCase() === 'waifu') | |
return `${waifuPrefix}${token.id}.png`; | |
if (token.uri && token.uri.startsWith('Qm')) | |
return `${ipfsPrefix}${token.uri}`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment