View Issue Details

IDProjectCategoryView StatusLast Update
0007915Talerwallet-corepublic2024-03-07 20:49
ReporterChristian Grothoff Assigned ToFlorian Dold  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionduplicate 
Platformi7OSDebian GNU/LinuxOS Versionsqueeze
Product Versiongit (master) 
Target Version0.9.4Fixed in Version0.9.4 
Summary0007915: pass correct currency_fraction_digits to wallet UIs
DescriptionThis is the desired number of digits amounts in this currency should typically be rendered in. As per castle discussion with Florian and Marc. The parameter is already supported in the latest exchange (defaults to 0).
TagsNo tags attached.

Relationships

duplicate of 0008184 assignedFlorian Dold wallet-core should provide real currency specification data instead of mock data [estimate: 6h] 

Activities

Florian Dold

2023-08-21 15:21

manager   ~0020420

In order for UIs to validate cached info about currencies, wallet-core should also emit a "currency-info-change" notification whenever currency info changes.

MarcS

2023-08-23 10:40

developer   ~0020427

Please set the default for numFractionalDigits to 2 (€, $, most other currencies), as 0 is only used by ¥.
(Some arabic currencies use 3 - I don't know any "global" currency using other values than 0, 2 or 3)
Set the default for numTinyDigits to 0.

Christian Grothoff

2023-08-23 10:48

manager   ~0020428

4a64d721..32659fe7 sets the default to 2 (in the exchange). Note that numTinyDigits should not have a default at all, it MUST be "computed" by the wallet based on the actual denominations offered by the exchange.

MarcS

2023-08-23 11:02

developer   ~0020429

"computed by the wallet" - does this mean wallet-core does this when it adds an Exchange, and whenever denominations change, but the result is rather a constant for the frontend (cached, with notification from wallet-core when changed)?
Or does the frontend need to compute this for every transaction?

Christian Grothoff

2023-08-23 11:25

manager   ~0020430

Wallet-core should (re)compute it whenever it gets a new /keys response. (count maximum number of fractional digits encountered in all denominations).

sebasjm

2023-08-24 20:29

developer   ~0020438

if the currency is official then we MUST use ISO 4217 table https://en.wikipedia.org/wiki/ISO_4217

what is the purpose or the user case for numTinyDigits ?

MarcS

2023-08-30 08:34

developer   ~0020462

Use case for numTinyDigits is to be able to specify e.g. fractions of a cent like gas filling stations do (1,23⁴ or 0.78⁹).

Florian Dold

2024-01-22 13:23

manager   ~0020949

This will be addressed by not mocking the currency specification anymore (See #8183).

Issue History

Date Modified Username Field Change
2023-08-11 16:32 Christian Grothoff New Issue
2023-08-11 16:32 Christian Grothoff Status new => assigned
2023-08-11 16:32 Christian Grothoff Assigned To => Florian Dold
2023-08-21 15:21 Florian Dold Note Added: 0020420
2023-08-23 10:40 MarcS Note Added: 0020427
2023-08-23 10:48 Christian Grothoff Note Added: 0020428
2023-08-23 11:02 MarcS Note Added: 0020429
2023-08-23 11:25 Christian Grothoff Note Added: 0020430
2023-08-24 20:29 sebasjm Note Added: 0020438
2023-08-30 08:34 MarcS Note Added: 0020462
2023-12-15 15:04 Florian Dold Target Version 0.9.4 => 0.10
2023-12-15 15:04 Florian Dold Summary pass currency_fraction_digits to wallet UIs => pass correct currency_fraction_digits to wallet UIs
2024-01-22 13:23 Florian Dold Status assigned => resolved
2024-01-22 13:23 Florian Dold Resolution open => duplicate
2024-01-22 13:23 Florian Dold Note Added: 0020949
2024-01-22 13:29 Florian Dold Relationship added has duplicate 0008184
2024-01-22 13:29 Florian Dold Relationship deleted has duplicate 0008184
2024-01-22 13:29 Florian Dold Relationship added duplicate of 0008184
2024-01-22 17:54 Christian Grothoff Fixed in Version => 0.9.4
2024-01-22 17:54 Christian Grothoff Target Version 0.10 => 0.9.4
2024-03-07 20:49 Christian Grothoff Status resolved => closed