Open mellosti opened 1 year ago
I followed this guide to create a React app with Vite and metaplex. My code looks like this:
import { Metaplex, Nft, PublicKey } from "@metaplex-foundation/js"; import { connection } from "../config/network"; const METAPLEX = Metaplex.make(connection); const NFTS_CLIENT = METAPLEX.nfts(); export async function getNFTsByOwner(owner: PublicKey): Promise<Nft[]> { const metadatas = await NFTS_CLIENT.findAllByOwner({ owner: new PublicKey(owner), }); const nftsAndSfts = await Promise.all( metadatas.map((metadata) => metadata.model === "metadata" ? NFTS_CLIENT.load({ metadata }) : metadata ) ); return nftsAndSfts.filter((nft) => nft.model === "nft") as Nft[]; }
However, the json field in Nft is always null, even though jsonLoaded is true. I have included "@metaplex-foundation/js": "^0.19.1", in my package.json. No error in the console.
json
Nft
jsonLoaded
"@metaplex-foundation/js": "^0.19.1",
me too have this error
Same here
I followed this guide to create a React app with Vite and metaplex. My code looks like this:
However, the
json
field inNft
is always null, even thoughjsonLoaded
is true. I have included"@metaplex-foundation/js": "^0.19.1",
in my package.json. No error in the console.