I am trying to iterate the NFTs captured from a user of a given contract.
my function:
const fetchNFTsForContract = async () => {
const options = {
chain: 'Mumbai',
address: account,
token_address: "0xA7CF70398F0f16B37E1BC58A8a9064a8761596c0", // opensea contract
};
const polygonNFTs = await Web3Api.account.getNFTsForContract(options);
setBalanceUser(...polygonNFTs.result);
console.log('sacando la metadata', polygonNFTs);
console.log('type of result', typeof polygonNFTs.result);
};
I was thinking of adding to a hook the array of objects with all the NFTs that appear in result.
then iterate it in a react fetchcard component one by one.
but I have some problemsโฆ
Here only one iterates for me. It takes only one object.
When I check the data by console specifying the type it does not tell me that it is an array but an object.
I know this is not a moralis problem but a reactive development problem, but if you could suggest a more effective way to render all this I would appreciate it.