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

feat: display an ENS avatar #2806

Merged
merged 12 commits into from
Nov 22, 2021
Prev Previous commit
Next Next commit
feat: support arweave uris
  • Loading branch information
zzmp committed Nov 16, 2021
commit 62f7d2aee47346ab60beddb1fa0d5b0e875d9303
3 changes: 3 additions & 0 deletions src/utils/uriToHttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export default function uriToHttp(uri: string): string[] {
case 'ipns':
const name = uri.match(/^ipns:(\/\/)?(.*)$/i)?.[2]
return [`https://cloudflare-ipfs.com/ipns/${name}/`, `https://ipfs.io/ipns/${name}/`]
case 'ar':
const tx = uri.match(/^ipns:(\/\/)?(.*)$/i)?.[2]
return [`https://arweave.net/${tx}`]
default:
return []
}
Expand Down