HomePhabricator

[Cashtab] replace BCHA decimal unit with a constant

Description

[Cashtab] replace BCHA decimal unit with a constant

Summary: BCHA has 8 decimal places, and the value "8" is occasionally used in calculation that convert between BCHA and satoshis. This diff replaces "8" with a constant in Ticker.js to support potential adjustments to this value. Note: this diff does not completely prepare the app to support different decimal places. An additional diff is required that would remove use of the .toSatoshis function from bch-js and replace it with a generalized conversion function.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Jan 25 2021, 15:52
bytesofmanPushed on Jan 25 2021, 18:34
Reviewer
Restricted Project
Differential Revision
D9054: [Cashtab] replace BCHA decimal unit with a constant
Parents
rABC4a29fe3f7a60: test: Add mempool_updatefromblock.py
Branches
Unknown
Tags
Unknown