Page MenuHomePhabricator

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

Authored by bytesofman on Nov 13 2024, 23:12.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
generalize-price-formatting
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31137
Build 61775: Build Diffecash-herald-tests
Build 61774: arc lint + arc unit