Hi, Im trying to get the token balance of one address using the method getTokenBalances but I receive an empty array.
const getTokenBalance = async () => {
const response = await Moralis.Web3API.account.getTokenBalances({
chain: 'eth',
address: '0x3d6c0e79a1239df0039ec16Cc80f7A343b6C530e',
});
console.log(response);
};
response
[]
So, I trying a lot of thing. When I change the function to getNativeBalance, I receive all Ok.
const getTokenBalance = async () => {
const response = await Moralis.Web3API.account.getNativeBalance({
chain: 'eth',
address: '0x3d6c0e79a1239df0039ec16Cc80f7A343b6C530e',
});
console.log(response);
};
response:
{balance: '19340262679426503'}
I think the problem its the method getTokenBalances
So my question its how I can get the token balancer for one address.