Skip to content

Balance is always treated like network currency #472

@wottpal

Description

@wottpal

Hey, when working with fungible token contracts (i.e. PSP-22) we've noticed that contracts-ui is statically assuming that values with the Balance type are always the native chain currency with it's decimals & token identifier.

In the PSP-22 interface, Balance is just an alias type for u128 and can have any decimal & any token identifier. And as the input field is already denominating with the networks decimals (e.g. 12) it's super confusing that it assumes the same for other tokens Balances.

Maybe adding a "Network Currency" switch that switches between networks decimals & token symbol between just the plain u128 value w/o any decimals applied would help here?

Screenshot 2023-05-04 at 17 14 33

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions