bafnetwork/baf-wallet-v2

Convert between Token Units

开放

#57 创建于 2021年5月3日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (0 个派生)auto 404
enhancementgood first issueux

仓库指标

星标
 (4 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南