Skip to content

Blank view when native currency symbol is missing; obsolete Astra DAO token decode errors #1807

Description

@DrDoofus-MD-PhD-DDS

Blank view when native currency symbol is missing; obsolete Astra DAO token decode errors

Summary

On Frame 0.6.11 for Linux, opening the full asset/token list caused the renderer to go completely blank. I traced the failure to a missing native-currency symbol for Hoodi (chain 560048). I also found a separate issue where the obsolete Astra DAO token contract causes repeated balanceOf decode warnings.

I was able to fix both locally with two small changes to app.asar. Existing accounts and signers continued to work normally, and no signer/private-key/password/signing code was modified.

Possibly related to #1645, although the reproduction and root cause here are more specific.

Environment

  • Frame 0.6.11
  • Linux / openSUSE Leap 16
  • Electron 23.1.3
  • Chromium 110

Issue 1: listing all tokens blanks the window

Frame starts normally, accounts load, and signers can be unlocked. However, clicking the control to show the complete token list caused the main Frame window to turn blank.

Running with DevTools enabled exposed the exception:

TypeError: Cannot read properties of undefined (reading 'toUpperCase')

The native balance updater currently gets the symbol only from:

store('main.networksMeta.ethereum', id, 'nativeCurrency', 'symbol')

For Hoodi (chain 560048), the normal network definition contained:

{
  "id": 560048,
  "name": "Hoodi",
  "symbol": "ETH",
  "nativeCurrencyName": "ETH"
}

but the corresponding networksMeta.ethereum.560048.nativeCurrency object had price data and no symbol field.

The stored Hoodi native balance therefore ended up without a symbol. When the expanded list rendered, an undefined currency symbol eventually reached code that calls .toUpperCase(), and the renderer crashed.

Local fix

In compiled/main/externalData/balances/index.js, I changed:

getNativeCurrencySymbol: (id) =>
    store('main.networksMeta.ethereum', id, 'nativeCurrency', 'symbol'),

to:

getNativeCurrencySymbol: (id) =>
    store('main.networksMeta.ethereum', id, 'nativeCurrency', 'symbol') ||
    store('main.networks.ethereum', id, 'symbol') ||
    store('main.networks.ethereum', id, 'nativeCurrencyName') ||
    '',

This is generic rather than Hoodi-specific. After rebuilding app.asar, the full asset list opened normally and the renderer exception disappeared.

Issue 2: obsolete Astra DAO token produces repeated balanceOf decode warnings

The balance worker repeatedly logged:

[scanWorker] Failed to decode balanceOf, {
  target: '0x7e9c15c43f0d6c4a12e6bdff7c7d55d0f80e3e23',
  results: '0x'
}

That address is included in Frame's token inventory as Astra DAO / ASTRA. The old contract returns an empty 0x result for balanceOf, which cannot be decoded as the expected uint256.

Frame already has a blacklist mechanism based on token.extensions?.omit. For local testing I extended isBlacklisted() in compiled/main/externalData/inventory/tokens.js to omit this address:

function isBlacklisted(token) {
    return token.extensions?.omit ||
        token.address?.toLowerCase() ===
            '0x7e9c15c43f0d6c4a12e6bdff7c7d55d0f80e3e23';
}

That removed the repeated decode warning. This was a real issue, but it was not the cause of the blank window, which is originally what I had thought was causing it.

Result after patching

After rebuilding Frame 0.6.11 with the two changes above:

  • accounts load normally
  • signers unlock normally
  • the complete asset/token list opens normally
  • the toUpperCase() renderer exception is gone
  • the Astra DAO balanceOf decode warning is gone
  • switching accounts/networks works normally in testing

I also created a small unified patch and reproducible AppImage rebuild instructions locally. Happy to provide the patch or open a PR if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions