Hi I am trying to get the price of an array of nfts however having this line const {data: nftPrice} = useEvmNFTLowestPrice({address: AppTokens[i].tokenAddress, chain: "5", marketplace:"opensea"})
within the for loop
causes issues. Any ideas on how to do this differently?
const price = 0
for(let i = 0 ; i< AppTokens.length; i ++)
{
const {data: nftPrice} = useEvmNFTLowestPrice({address: AppTokens[i].tokenAddress, chain: "5", marketplace:"opensea"})
const json = nftPrice.toJSON()
const value = parseInt(ethers.utils.formatUnits(json.price)*AppTokens[i].time)
price += value
}
console.log(price)