Skip to content

Custom network incorrect account balance when symbol is left blank. #9492

@tmashuang

Description

@tmashuang

Describe the bug
When a custom network symbol that we optionally take is left blank we assume it is an ETH network. So then we apply the ETH conversion rate to getBalance. This is easily result in users thinking they have more funds they they actually do when viewing their balance. The max amount in the send field will show the correct amount.

To Reproduce (REQUIRED)
Steps to reproduce the behavior, libraries used with version number, and/or any setup information to easily reproduce:

  1. Add the xDai network, steps are xDai MetaMask setup
  2. Omit the asset symbol which we say is optional
  3. The current conversion rate of ETH should times the balance we get from the network and apply the ETH suffix to the value.

Expected behavior
Either require the network symbol field to prevent this behavior, or when on a network other than the defaults do not apply the conversionRate to it.

Screenshots
image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions