CityOfZion/neon-wallet

NEP-5 balances not displaying for some accounts

hal0x2328 opened this issue · 3 comments

Legacy NEP-5 balance display is broken under some conditions - one condition is if the user has ever provided liquidity to a legacy Flamingo pool.

The issue is related to CityOfZion/neon-js#921 - when the token info call fails due to neon-js' inability to decode the totalSupply (even on a LP pair token with no remaining balance), Neon no longer continues trying to retrieve token balances for the rest of the NEP-5 tokens in the wallet.

If possible, Neon should try and handle the token info error gracefully and just skip any it can't decode (I don't believe totalSupply is even used anywhere in Neon)

Here's an example for reproduction:

  1. Import a watch account for the address AKEX765mtnPUPj4L5n5C8KcauGkRkuTuxQ
  2. Neon shows the following error in the debug tools console:
bundle.js:formatted:525160 Error: Expected a hexstring but got 33119936322
    at S (bundle.js:formatted:39878:27)
    at M (bundle.js:formatted:39863:17)
    at Array.O (bundle.js:formatted:69284:57)
    at bundle.js:formatted:42405:36
    at Array.map (<anonymous>)
    at f.parse (bundle.js:formatted:42404:30)
    at bundle.js:formatted:41279:27
  1. No NEP-5 token balances are displayed, despite this address having a balance of nNEO and fUSDT