Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert between Token Units #57

Open
3 tasks
Sladuca opened this issue May 3, 2021 · 0 comments
Open
3 tasks

Convert between Token Units #57

Sladuca opened this issue May 3, 2021 · 0 comments
Labels
enhancement New feature or request good first issue non-trivial issue as a natural follow-up to a "ramp up task" ux

Comments

@Sladuca
Copy link
Contributor

Sladuca commented May 3, 2021

We should convert to/from the "really big number" representation (i.e. wei, yoctoNEAR, lamports, etc) whenever we:

  • display amounts
  • collect amount from forms

The best place to put this functionality is probably the Converter sub-interface of ChainInterface so that chain implementations can be expected to implement this function.

Tasks

  • add two function types to Converter, one for going each way
  • implement these functions in nearConverter converting between YoctoNEAR and NEAR
  • use them in the UI for the amount in sendForm
@Sladuca Sladuca added enhancement New feature or request good first issue non-trivial issue as a natural follow-up to a "ramp up task" ux labels May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue non-trivial issue as a natural follow-up to a "ramp up task" ux
Projects
None yet
Development

No branches or pull requests

1 participant