Page MenuHomePhabricator

[herald] New formatPrice function to prep prices for tg msgs
ClosedPublic

Authored by bytesofman on Apr 8 2023, 17:27.

Details

Summary

T2972

Depends on D13641

Add new function to format price with correct fiat currency symbol, if available

Test Plan

npm test
npm run getCoingeckoPrices and note prices appear with currency symbol

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.Apr 9 2023, 09:19
Fabien added a subscriber: Fabien.
Fabien added inline comments.
apps/ecash-herald/src/utils.js
84 ↗(On Diff #39444)

10 seems a bit low, that's up to 10% error. 100 is more consistent with the error from 2 decimal places

This revision now requires changes to proceed.Apr 9 2023, 09:19

Round 2 decimal places if price < 100

This revision is now accepted and ready to land.Apr 10 2023, 19:11