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

Event Timeline