Skip to content

#toWei breaks for decimal inputs of "wei" and "noether" #1

Open
@RyanRHall

Description

@RyanRHall

Issue Type

Description

#toWei breaks for decimal inputs of "wei" and "noether"

Steps to reproduce

// these *should* throw errors
unit.toWei(0.1, 'noether') // 1
unit.toWei(0.1, 'wei') // 1

Note that larger denominations work fine

// these work as expected
unit.toWei(0.1, 'kwei') // 100
unit.toWei(0.001, 'kwei') // 1
unit.toWei(0.0001, 'kwei') // throws error

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