HomePhabricator

[ecash-price] Add name() and symbol() facilities

Description

[ecash-price] Add name() and symbol() facilities

Summary:
It's very common to display the "name" and/or the symbol of a currency, e.g. to select the favorite.
This could be done at the callsite but it takes a bit of time to figure out how to do it properly, so let's implement it in the lib.

The null cases are actually unreachable, and the system locale is used as a fallback is the locale is unsupported so it can't be tested.

Test Plan:

pnpm test

Reviewers: #bitcoin_abc, bytesofman

Reviewed By: #bitcoin_abc, bytesofman

Subscribers: bytesofman

Differential Revision: https://reviews.bitcoinabc.org/D19345

Details

Provenance
FabienAuthored on Jan 14 2026, 13:45
FabienPushed on Jan 14 2026, 16:29
Reviewer
Restricted Project
Differential Revision
D19345: [ecash-price] Add name() and symbol() facilities
Parents
rABCd9e34721f4fb: [e.cash] Avoid typescript errors
Branches
Unknown
Tags
Unknown