getTokeBalances() not resolving

It used to return something containing .Balance = 0 (which was correct, for this address)

const payload = { chain: “eth”, to_block: 9297670 };
const balance = await Web3Api.account.getTokenBalances(payload);

The entire parameters, including the address, I can not test only with what you pasted.

That is the entire parameters, my user logs in through MetaMask and therefore Moralis has the user auth’d already, so my address gets automatically injected… This is a copy and paste of the code that generates the Request Payload shown above (where my address appears inside it)

This is what you write, but it will automatically make the request for your current user address. I also need that address to test what it should be the output. And you make this request for mainnet, not for testnet. because “eth” = mainnet.

0x69C5779a4b1D6864826A74F70D992AeD40B19Bf1 is the address. Ah okay, so how would I configure for testnet? (Rinkeby)

You write “rinkeby” instead of “eth”

Okay, then that might fix the entire problem - as my backend is configured for Rinkeby

The request will work with any chain, but in order to return something you need to use an address that has some tokens. It doesn’t look like it returns anything for me for 0x69C5779a4b1D6864826A74F70D992AeD40B19Bf1

So, if you have no tokens it wont return anything? Odd, when it did run the .balance gave me 0, so I assumed Moralis auto-resolves any problems in the back to 0, just so you get a return.

Also, someone with a wallet that has 1 ETH in it gets the same return (the screenshot from macOS is with that 1 ETH wallet being used). Along with that, when I used the address you gave me I also got {}

ETH is not same thing as tokens, is a different thing.

I’m not sure I understand, Ethereum is a token no? What tokens do I need to generate a return, then? Thanks

ETH is the main blockchain currency, it is not a token, you can get the balance of ETH with a separate function. A token is for example an ERC20 token like USDT.

Thanks a lot man, basically if I remove the block number the code works again (not sure why the block is invalid when I can see it in the Moralis backend). If it’s okay, can I get back to you if the transaction doesnt go through (this is where my problem originally was before I updated my SDK and broke everything).