Page MenuHomePhabricator

[Cashtab] New formatting method for getting decimals for very small xec values
ClosedPublic

Authored by bytesofman on Oct 18 2024, 00:04.

Details

Summary

Agora partials can be priced in nanosatoshis. We want a way to render these as localeStrings with appropriate minimimumFractionDigits.

Add new formatting helper functions.

Not implemented in this diff, see D16846 for the purpose.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
get-decimals-formatting
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30647
Build 60810: Build Diffecash-lib-tests · cashtab-tests
Build 60809: arc lint + arc unit

Event Timeline

improve function, add other related price formatting function

PiRK added inline comments.
cashtab/src/utils/fixtures/vectors.js
454 ↗(On Diff #50168)
PiRK requested changes to this revision.Oct 18 2024, 06:32

There is a test that does not do what it claims to do.
Otherwise looks good.

This revision now requires changes to proceed.Oct 18 2024, 06:32

fix accidentally copied unit test

This revision is now accepted and ready to land.Oct 18 2024, 12:46