I only get an empty array back when I try to run getNFTs() for my rinkeby testnet account in my react application.
The account address is 0x7a84ac83a8e54bd8f8bd79cfae12038c46b417a3
I tried with vanilla JS and it worked as it should, but it doesn’t seem to work with react.
Here is my code and here are the logs that show that my cloud function returns some of my NFTs, but the getNFTs() function returns nothing.
Moralis.Cloud.run("getUserItems")
.then(async ownedItems => {
console.log('CLOUD FUNCTION')
console.log(ownedItems)
console.log('')
console.log('')
console.log('')
Moralis.Web3.getNFTs({chain: 'rinkeby'})
.then(res => {
console.log('GET NFTS FUNCTION')
console.log(res)
console.log('')
console.log('')
})
.catch(err => console.log(err))
Moralis.Web3.getNFTs({chain: 'rinkeby', address: '0x7a84ac83a8e54bd8f8bd79cfae12038c46b417a3'})
.then(res => {
console.log('GET NFTS FUNCTION WITH ADDRESS')
console.log(res)
console.log('')
console.log('')
console.log('')
})
.catch(err => console.log(err))