bafnetwork/baf-wallet-v2

Convert between Token Units

Ouverte

#57 ouverte le 3 mai 2021

 (0 commentaire) (0 réaction) (0 personne assignée)TypeScript (0 fork)auto 404
enhancementgood first issueux

Métriques du dépôt

Stars
 (4 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur