HomePhabricator

[ecash-herald] Standardize the way we convert satoshi values to formatted…

Description

[ecash-herald] Standardize the way we convert satoshi values to formatted amounts

Summary:
The satsToFormatteValue function is specialized for an arcane herald-native object, coingeckoPrices, which was overengineered to support potential changes of fiat currency for the herald. We have never used this feature.

So, refactor herald so that satsToFormattedValue accepts a USD price. This allows us to extend its use into the daily summaries. We implement it there.

Test Plan: npm test

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Wed, Nov 13, 23:10
bytesofmanPushed on Thu, Nov 14, 13:40
Reviewer
Restricted Project
Differential Revision
D17136: [ecash-herald] Standardize the way we convert satoshi values to formatted amounts
Parents
rABCd705d989c04c: [Cashtab] More improvements to agora partial sale tx parsing
Branches
Unknown
Tags
Unknown