- I am calling getAllERC20({address, chain: โbscโ}); its giving me cors issue on localhost. while if i call the same api without chain its working fine.
1 Like
sorry. I am calling with the right syntax. just wrote it here wrong. previously it used to work. suddenly it started giving me cors issue. updated my server also.
You may be calling too many requests at the same time
Iโm having the same issue with the bsc chain, not doing much calls, all was working before
export const getAllTokens = async (address, chain) => {
const options = {
chain,
address,
order: "desc",
};
const web3 = getWeb3Chain(chain);
let balances = await Moralis.Web3.getAllERC20(options);
balances = balances.map((balance) => {
if (balance.balance !== 0) {
balance.balance = web3.utils.fromWei(balance.balance);
}
return balance;
});
balances = balances.filter((balance) => balance.balance !== "0");
return balances;
};
noโฆonly 1 request at a time.
We found the issue, fix coming
We have fixed this issue . Now it works correctly!
Thank you for your patience
3 Likes