ankr.js icon indicating copy to clipboard operation
ankr.js copied to clipboard

`tokenName` is inconsistent when calling `getAccountBalance` on Ethereum Sepolia/Holesky

Open aidandenlinger opened this issue 1 year ago • 0 comments

When calling getAccountBalance on a wallet with Ethereum Sepolia or Holesky, between requests the tokenName in the returned Balance object will occasionally not be consistent and changes between ETH and Ethereum Testnet Sepolia (or Ethereum Testnet Holesky for Holesky). This may happen on other chains, but I've only noticed it on Ethereum testnets.

   {
    "blockchain": "eth_sepolia",
    "tokenName": "Ethereum Testnet Sepolia",
    ...
  },
  {
    "blockchain": "eth_sepolia",
    "tokenName": "ETH",
    ...
  },

This issue does not always happen. I think after a period of time the requests get cached and it picks one name to use, but after a period of time it will be inconsistent again.

I have a small Typescript project that reproduces the issue here. The repo also includes a folder of examples that show the issue here. Two wallets with some Ethereum Sepolia that exhibit the issue are

  • 0x52f6c0b306e66893c0414abb70951c4dac15a969
  • 0xd60d9aa2c3fd053e50e1f518bad20366325a7291

aidandenlinger avatar Sep 05 '24 23:09 aidandenlinger