Skip to content

Handle IPFS top-level with IPFS image URL#7

Merged
johnmosesman merged 3 commits intomainfrom
ipfs-ipfs
Feb 11, 2022
Merged

Handle IPFS top-level with IPFS image URL#7
johnmosesman merged 3 commits intomainfrom
ipfs-ipfs

Conversation

@johnmosesman
Copy link
Contributor

No description provided.

export const handleIpfs = async (tokenUri: string): Promise<Reason[]> => {
let reasons: Reason[] = [Reasons.tokenUriIsIpfs];

let res: Metadata = await axios.get(tokenUri);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add an issue to test fail case here


let res: Metadata = await axios.get(tokenUri);

if (res.image && isTokenUriIpfs(res.image)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is there is no res.image? Is that an error or a /shrug?

This would be nice to have a non-counted issue or warning

@johnmosesman johnmosesman merged commit 4d9e9d7 into main Feb 11, 2022
@johnmosesman johnmosesman deleted the ipfs-ipfs branch February 11, 2022 18:56
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