From bd81cb41335c3bfcc849b0afc4315a0c308441e4 Mon Sep 17 00:00:00 2001 From: x Date: Thu, 26 Sep 2024 13:00:13 +0200 Subject: [PATCH] Fix lint --- src/helpers/metadata.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/metadata.ts b/src/helpers/metadata.ts index bf84bb3..ae03d77 100644 --- a/src/helpers/metadata.ts +++ b/src/helpers/metadata.ts @@ -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!) .use(mplTokenMetadata()) const metadata = await Promise.all(mints.map(async mint => { try { const data = await fetchDigitalAsset(umi, fromWeb3JsPublicKey(new PublicKey(mint))); - 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) {