Skip to content

UI token amount results in different numbers on chain #2053

Description

@shayanb

Describe the bug
Seems that the number formatter for the number of voting tokens is different in different views. Sometimes 10 means 10 voting tokens, some other times it means 10 / 10^18 tokens. I'll explain the work flow we used that resulted in such issue in to reproduce

To Reproduce
Steps to reproduce the behavior:

  1. Summoned a DAO with 2 initial members each having 10 voting tokens (this resulted in 2 members with 10 voting tokens each)
  2. Propose to add 5 members each with 10 voting tokens. (this resulted in each new member having 0.00000000000000001 tokens.

Expected behavior

When typing in 10 in the DAOHaus form, expected behaviour is to always result in the same number on chain. either both to be 10 or both to be 10 "wei".

Actual behavior

On the summoning DAO form 10 means 10 * 10^18 in the sense of token amount
On the proposal view to add members 10 means 10 wei in the sense of token amount

Screenshots
Screenshot 2023-03-12 at 4 32 41 PM
Screenshot 2023-03-12 at 4 32 26 PM

Additional Questions

  1. [ Maybe?] Is there a loss of funds, shares or loot?

Application area

Where in the app is this happening?

  • FrontEnd (please include route/section if possible)

  • Integration or Boost

  • Browser: Chrome

  • Version: Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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