Skip to content

0 is rendered as 0.000 #442

@ECWireless

Description

@ECWireless

Describe the bug

In TreasuryVotingWidget, and likely other locations, a zero value is being rendered as 0.000, rather than just 0:

Image

This makes it look like the value is something smaller than 0.000, rather than actually being 0.

abbreviateNumber should probably be modified to return "0," if the arg is 0, rather than running it through Number.parseFloat(newValue).toPrecision(precision).

To Reproduce

  • If you have 0 voting power, go to a treasury proposal
  • Check your voting power in the TreasuryVotingWidget on the right

Expected behavior

If you have 0 voting power, it should be rendered as "0", not "0.000"

Screenshots

No response

Desktop OS

No response

Desktop Browser

No response

Desktop Wallet

No response

Desktop App/Extension Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Wallet

No response

Smartphone App/Extension Version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions