Bug 492072

Summary: Price information in exponential form is not supported
Product: [Frameworks and Libraries] alkimia Reporter: Thomas Baumgart <tbaumgart>
Component: GeneralAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: master   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In: 8.2
Sentry Crash Report:

Description Thomas Baumgart 2024-08-23 10:32:35 UTC
SUMMARY

For some currencies (e.g. Bitcoin) the current rate is returned in an exponential format (e.g. 5.222e-5) by fx-rate.net

STEPS TO REPRODUCE
1. Start online quotes editor and select the KMyMoney currency entry in the kmymoney5 profile.
2. Use "EUR BTC" as the entry for two symbols
3. Press the check source button

OBSERVED RESULT

Price is returned as 5.222

EXPECTED RESULT

Price is returned as 0.00005222 (only the value is important, not the representation, so 5.222e-5 is equally OK)
Comment 1 Thomas Baumgart 2024-08-23 10:33:27 UTC
Git commit 42b0c54294ef81095ec3afd226cf66e5e84613f1 by Thomas Baumgart.
Committed on 23/08/2024 at 10:33.
Pushed by tbaumgart into branch 'master'.

Support exponential price format

For some (e.g. Bitcoin) currencies, the current rate is returned in an
exponential format (e.g. 5.222e-23). This change provides the support to
extract that price correctly.
FIXED-IN: 8.2

M  +5    -0    autotests/alkonlinequoteprivatetest.cpp
M  +1    -1    src/alkonlinequote_p.cpp

https://invent.kde.org/office/alkimia/-/commit/42b0c54294ef81095ec3afd226cf66e5e84613f1