GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

Chore: Replace Token/Decimal usage with useDapps Currency/CurrencyValue classes #86

Closed L03TJ3 closed 3 months ago

L03TJ3 commented 6 months ago

Currently in the app the Token class from uniswap sdk is being used. There are now multiple local helper methods, repeated passing down of multiple split-up props and formatting done in a way which makes for overcomplicated ui components.

I would like to see it replaced by https://usedapp-docs.netlify.app/docs/api%20reference/models/#currency

  1. it can be used for: native-tokens / erc-Tokens / FiatCurrency's
  2. no need for 3/4 different libraries to work with tokens or currencies (Token/Decimal.js/ethers.utils etc)
  3. Would remove the need of maintaining local helper methods
  4. easier formatting and simplification of ui components
  5. aligning a standard on how we present the G$ token and amounts/values

Likely this can be re-used as well: https://github.com/GoodDollar/GoodWeb3-Mono/blob/master/packages/sdk-v2/src/sdk/constants.ts

L03TJ3 commented 5 months ago

@decentralauren @patpedrosa whenever there is room in a sprint I would like to add this. nothing is broken as far as I can tell, just would be pushing a standard across our dapps how we manage/handle/format Tokens and Currencies

github-actions[bot] commented 3 months ago

Stale issue message