View Issue Details

IDProjectCategoryView StatusLast Update
0008020Talerotherpublic2024-03-07 19:47
ReporterFlorian Dold Assigned ToChristian Grothoff Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008020: address and clarify confusion in CurrencySpecification
DescriptionCurrently, multiple components / parts of the documentation have different interpretations of the CurrencySpecification.

Either:
(a) the currency code is part of the CurrencySpecification
(b) the currency code is served *alongside* the CurrencySpecification, either as a sibling member in a JSON object or as the key in a mapping from currency to CurrencySpecification

I thought we had previously agreed that the CurrencySpecification should *not* contain the currency code. In discussions with Marc, it became clear that our team/specs/implementations are not aligned here yet.

However, the exchange docs and implementation still have the currency field inside `CurrencySpecification`. DD51 doesn't have the field, libeufin-bank doesn't have the field either.
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

MarcS

2023-12-21 19:18

developer   ~0020782

Last edited: 2023-12-21 19:20

Since the "currency" we use everywhere should BE the ISO 4217 code for real-world currencies, and must have >= 4 letters for regional currencies, we don't need this specified elsewhere.

The DD51 currency specs already contains a “name” field:

export interface CurrencySpecification {
  name: string;
  num_fractional_input_digits: Integer;
  num_fractional_normal_digits: Integer;
  num_fractional_trailing_zero_digits: Integer;
  alt_unit_names: {
    [log10: string]: string;
  };
}

This “name” should be made optional and NOT be returned for ISO 4217 currencies.
This name is only needed for regional currencies.

When an App or WebEx needs the name of the currency, it should just ask the system it runs on for that (localized) name.

For instance, iOS provides these Calls

    /// check whether a 3 letter code is a known ISO-4217 currency
    public var isISOCurrency: Bool

    /// Returns a list of `Locale` currency codes defined in ISO-4217
    public static var isoCurrencies: [Locale.Currency]

    /// Returns a localized string for a specified ISO 4217 currency code.
    /// For example, in the "en" locale, the result for `"USD"` is `"US Dollar"`.
    public func localizedString(forCurrencyCode currencyCode: String) -> String?


I am pretty sure Android has similar functions.

Christian Grothoff

2023-12-22 06:39

manager   ~0020788

Marc: Please don't presume all wallets are on iOS or Android. I don't see POSIX having "localizedString()".

The 'name' field in the currency specification is the long name ("US Dollar"), not the currency code. This should stay, even for non-regional currencies, as some client platforms may not have a built-in list.

Christian Grothoff

2023-12-22 06:57

manager   ~0020789

Removed currency code field as of exchange protocol v18.

Issue History

Date ModifiedUsernameFieldChange
2023-12-20 09:37Florian DoldNew Issue
2023-12-20 09:37Florian DoldStatusnew => assigned
2023-12-20 09:37Florian DoldAssigned To => Christian Grothoff
2023-12-20 10:36MarcSDescription Updated
2023-12-21 19:18MarcSNote Added: 0020782
2023-12-21 19:20MarcSNote Edited: 0020782
2023-12-22 06:39Christian GrothoffNote Added: 0020788
2023-12-22 06:57Christian GrothoffNote Added: 0020789
2023-12-22 06:58Christian GrothoffStatusassigned => informing
2023-12-22 06:58Christian GrothoffResolutionopen => fixed
2023-12-22 06:58Christian GrothoffFixed in Version => 0.9.4
2024-03-07 19:47Christian GrothoffStatusinforming => closed