I understand I am on an unpaid account however the work I am doing doesnât seem to justify a rate limit as of yet. I assume my error is in the way my code is written as on my console I see a loop of console.logs (instead of a log appearing once it is stuck in a loop)
const { fetch: play, data: date } = useEvmRunContractFunction()
const { data: balances } = useEvmWalletTokenBalances({ address: "0x1DFf1b18a06ca76014cEeab849aaB8DcCfAb4329", chain: '1' })
console.log(balances)
if (balances?.length > 0) {
var balenci = []
for (let i = 0; i < balances.length; i++) {
balenci.push(balances[i].toJSON())
}
}
console.log(balenci)
const appT = []
const notAppT = []
for (let i = 0; i < balenci?.length; i++) {
play({
abi: tokenAbi,
address: balenci[i]?.token.contractAddress,
functionName: "allowance",
params: {
owner: "0x1DFf1b18a06ca76014cEeab849aaB8DcCfAb4329",
spender: contractAd,
},
chain: "1"
})
console.log(date)
if (date > 0) {
appT.push(balenci[i])
}
else if (date == 0) {
notAppT.push(balenci[i])
}
}
console.log("Approved ", appT)
console.log("Not Approved ", notAppT)