telosnetwork / open-block-explorer

The Open Block Explorer (OBE) is the first open source block explorer that is designed to support all AntelopeIO-based blockchains.
https://explorer.telos.net
Apache License 2.0
27 stars 24 forks source link

eosio.wrap account not found #855

Open Viterbo opened 5 months ago

Viterbo commented 5 months ago

Describe the bug The eosio.wrap account appears as not found when the problem is that the backend is not returning the total_resources data and the code fails to avoid the null value.

To Reproduce https://explorer.telos.net/account/eosio.wrap?tab=transactions

Expected behavior If it exists (in this case it does) the accounts must be shown. If the account is a system account and it does not bring the resources info, we need to hide the resources detail and show something else instead (like a text explaining it's a system account and it does not have resources info).

Aditional info The current problem is that the total_resources property comes null and WWE are not avoiding that null value:

stakedResources.value =
    Number(accountData.value.total_resources.cpu_weight.value || 0) +
    Number(accountData.value.total_resources.net_weight.value || 0);

Screenshots image