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 Errors
SeverityLocationCodeMessage
Errorcashtab/src/utils/__tests__/formatting.test.js:136ESLINTjest/no-focused-tests
Unit
No Test Coverage
Build Status
Buildable 30645
Build 60806: Build Diffecash-lib-tests · cashtab-tests
Build 60805: 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