Closed coolb0y closed 1 year ago
The issue was really basic. I once wrote this but vscode shows error so I removed this. But changing lines from
myNfts.map(async(nftdata)=>{
// console.log(nftdata,'nftdata');
let tempnft = await metaplex.nfts().load({nftdata});
console.log(tempnft)
})
to this solved my problem
myNfts.map(async (nftdata) => {
console.log(nftdata.mintAddress.toBase58(), 'nftdata');
let tempnft = await metaplex.nfts().load({metadata: nftdata});
})
I was fetching the nfts owned by a user. (Note:- My task was to load image url as well so I can render it on webpage which I put in metadata uploaded to arweave. If I was able to get image url directly without loading json or there is way to store the image url in nft itself and not in the metadata That would solve my issue as well. )
Though the data in myNfts is metadata model type see the image below
So I added the load method
But instead of tempnft having metadata loaded. I am getting an error