Skip to content

Commit

Permalink
move nft and ipfs module to hypervibes directory
Browse files Browse the repository at this point in the history
  • Loading branch information
bvalosek committed Dec 9, 2021
1 parent 182cdee commit 3725f90
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useMetadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useQuery } from 'react-query';
import { Metadata, resolveMetadata } from '../lib/nft';
import { Metadata, resolveMetadata } from '../hypervibes/nft';

export default (tokenUri: string | undefined | null) => {
const query = useQuery<Metadata | undefined, Error>(
Expand Down
3 changes: 0 additions & 3 deletions src/hypervibes/index.ts

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions src/lib/nft.ts → src/hypervibes/nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const resolveMetadata = memoize(async (uri: string) => {
// ipfs-style metadata
const hash = extractIpfsHash(uri);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let fetched: any;

// use throttled ipfs fetch if ipfs, else str8 fetch it
Expand All @@ -43,6 +44,7 @@ export const resolveMetadata = memoize(async (uri: string) => {
});

// given metadata blob, figure out the image we want to use
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const resolveMetadataImage = (payload: any): string | undefined => {
// various metadata formats, trying to be accomodating
const image = payload.image ?? payload.imageUrl ?? payload.image_url;
Expand Down

0 comments on commit 3725f90

Please sign in to comment.