I am struggling with the metaplex.nfts().loadNft()
:
https://github.com/metaplex-foundation/js#loadnft
I am getting a list of NFT from a wallet using findAllByOwner()
. But, it says lazy = true
.
So, I am trying to load the NFT and not the LazyNFT:
// Get list of NFTs
const holdingNFTs = await metaplex.nfts().findAllByOwner(wallet).run();
const lazyNft = holdingNFTs[0];
const nft = await metaplex.nfts().loadNft(lazyNft, { commitment: 'confirmed' } ).run();
And I am getting this error:
Argument of type 'Nft | LazyNft' is not assignable to parameter of type 'LazyNft'. Type 'Nft' is not assignable to type 'LazyNft'. Type 'Nft' is not assignable to type 'Readonly<{ lazy: true; }>'. Types of property 'lazy' are incompatible. Type 'false' is not assignable to type 'true'.
Any ideas? What am I doing wrong? I couldn't find any code examples.
Thanks!