-
Notifications
You must be signed in to change notification settings - Fork 137
API endpoint /api/account/addresstokenbalance is returning ERC721sΒ #504
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
π Bug Report
Getting the token balance of ERC20s for an address returns a list that includes ERC721s.
π Description
The balanceService.getBalances(address) is returning a list of ERC20s along with ERC721s
π Reproduction Steps
https://block-explorer-api.mainnet.zksync.io/api?module=account&action=addresstokenbalance&address=0x0f6bfc4C284e489B404715B3F2610b0eb50FdE35
as well as:
https://block-explorer-api.mainnet.zksync.io/address/0x0f6bfc4C284e489B404715B3F2610b0eb50FdE35
Checking the return data, the last item in the list is "empty" data for a token with a quantity of 1.
{
// Contract address is for CyfrinFoundryCourseNft
"TokenAddress": "0xBbA202c6DA89646F13C11a63C4aF182E4fFd4c2e",
"TokenName": "",
"TokenSymbol": "",
"TokenQuantity": "1",
"TokenDivisor": ""
}
π€ Expected Behavior
Only ERC20s listed for an address.
π― Current Behavior
ERC20 and ERC721 are listed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working