HomePhabricator

[Cashtab] Make the header balance a localeString

Description

[Cashtab] Make the header balance a localeString

Summary:

  • Updated formatBalance in @utils/CashMethods.js which is used to format the header XEC balance. The new function takes in the balance and an optional locale parameter and returns a formatted value accordingly. This function previously hard coded spaces for large balances.
  • New unit tests created in @utils/__tests__cashMEthods.test.js for the redesigned formatBalance function.
  • New snapshots generated across Wallet, Send and Tokens UI.

Test Plan:

  • npm start
  • navigate to Wallet, Tokens and Send UIs and ensure the header XEC balance is displayed correctly per locale.
  • npm run extension
  • Check header XEC balance is displayed per locale in browser extension mode

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Oct 13 2021, 06:15
emackPushed on Oct 29 2021, 03:05
Reviewer
Restricted Project
Differential Revision
D10319: [Cashtab] Make the header balance a localeString
Parents
rABC3b8fda5f6356: [Cashtab]css bug patch
Branches
Unknown
Tags
Unknown