HomePhabricator

[Cashtab] Convert calculated fiat amount string to locale string

Description

[Cashtab] Convert calculated fiat amount string to locale string

Summary:
Linked to T1710:

  • Created new formatFiatBalance function in validation.js which takes in the fiatBalance and an optional locale parameter. A locale formatted string is then returned accordingly.
  • Created unit tests for formatFiatBalance in validation.test.js
  • Updated Send.js to pass in fiatPriceString to the formatFiatBalance function
  • Updated UI snapshots for Send

Test Plan:

  • npm start
  • navigate to the Send UI
  • Ensure it is displaying zero fiat currency by default
  • Input 500000000 as the XEC amount and ensure the calculated fiat figure is displayed in locale format
  • npm run extension
  • Repeat above in browser extension mode

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D10332

Details

Provenance
emackAuthored on Oct 13 2021, 23:41
emackPushed on Oct 29 2021, 03:33
Reviewer
Restricted Project
Differential Revision
D10332: [Cashtab] Convert calculated fiat amount string to locale string
Parents
rABC12a12f7a7257: [Cashtab] Nav menu fix post label rebrand
Branches
Unknown
Tags
Unknown