Page MenuHomePhabricator

[ecash-herald] Format sent xec amounts
ClosedPublic

Authored by bytesofman on Jun 19 2023, 19:31.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCad04bbc9a7ab: [ecash-herald] Format sent xec amounts
Summary

T2972

Add a new function to convert satoshis to a formatted string appropriate for a msg.

Implement for normal XEC txs. Not implemented (yet) for encrypted cashtab msgs, airdrops, and fusions as these functions preferencially display fiat values if they have them. Will add here after adding a function to format fiat values.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
format-xec-amounts-herald
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24091
Build 47792: Build Diffecash-herald-tests
Build 47791: arc lint + arc unit

Event Timeline

PiRK added a subscriber: PiRK.
PiRK added inline comments.
apps/ecash-herald/test/utilsTests.js
200

nit: this example is not rounded

This revision is now accepted and ready to land.Jun 19 2023, 20:14

clarifying unit test, adding rounding example for trillions

This revision was landed with ongoing or failed builds.Jun 19 2023, 21:31
This revision was automatically updated to reflect the committed changes.