Skip to content

Bags-List shows wrong values for min/max #11445

Open
@drgora

Description

@drgora

As the title says, the min/max values that represent the thresholds for each bag in the Bags-List page might be incorrect in some cases.

Specifically, I believe the problem is that the code assumes a 1:1 map from vote to currency, as is the case for chains with a total supply lower than u64::MAX.

Unfortunately, that conversion is not always correct: as per the default implementation of the CurrencyToVote trait, if the total supply is greater than u64::MAX, then a factor != 1 is used. This seems to be ignored at this line, and the UI ends up showing misleading information (as shown in the screenshot below).

Image

Notice, this issue is not specific to chains with 18 decimals; it will affect also Polkadot, if the total supply will ever grow beyond u64::MAX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions