Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
x committed Sep 26, 2024
1 parent 70208fe commit bd81cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { fromWeb3JsPublicKey } from "@metaplex-foundation/umi-web3js-adapters";
import { PublicKey } from "@solana/web3.js";

export const getMetadata = async (mints: string[]) => {
const umi = createUmi(process.env.MAINNET_SOLANA_RPC_ENDPOINT)
const umi = createUmi(process.env.MAINNET_SOLANA_RPC_ENDPOINT!)

Check failure on line 7 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Replace `··const·umi·=·createUmi(process.env.MAINNET_SOLANA_RPC_ENDPOINT!)⏎········.use(mplTokenMetadata())` with `const·umi·=·createUmi(process.env.MAINNET_SOLANA_RPC_ENDPOINT!).use(⏎····mplTokenMetadata(),⏎··);`

Check failure on line 7 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Unsafe assignment of an `any` value

Check failure on line 7 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Unsafe call of an `any` typed value
.use(mplTokenMetadata())

Check failure on line 8 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Unsafe member access .use on an `any` value

const metadata = await Promise.all(mints.map(async mint => {

Check failure on line 10 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Replace `····const·metadata·=·await·Promise.all(mints.map(async·mint·=>·{·` with `··const·metadata·=·await·Promise.all(⏎····mints.map(async·(mint)·=>·{`
try {

Check failure on line 11 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Delete `··`
const data = await fetchDigitalAsset(umi, fromWeb3JsPublicKey(new PublicKey(mint)));

Check failure on line 12 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Replace `············const·data·=·await·fetchDigitalAsset(umi,·fromWeb3JsPublicKey(new·PublicKey(mint)));` with `········const·data·=·await·fetchDigitalAsset(⏎··········umi,⏎··········fromWeb3JsPublicKey(new·PublicKey(mint)),`

Check failure on line 12 in src/helpers/metadata.ts

View workflow job for this annotation

GitHub Actions / Check

Unsafe argument of type `any` assigned to a parameter of type `Pick<Context, "rpc" | "eddsa" | "programs">`
const dataFromUrl = await fetch(data.metadata.uri).then(res => res.json());
const dataFromUrl = (await fetch(data.metadata.uri).then(res => res.json())) as { image: string };

return { ...data, imageUrl: dataFromUrl.image };
} catch (e) {
Expand Down

0 comments on commit bd81cb4

Please sign in to comment.