Bug 492072 - Price information in exponential form is not supported
Summary: Price information in exponential form is not supported
Status: RESOLVED FIXED
Alias: None
Product: alkimia
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: master
Platform: unspecified All
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-23 10:32 UTC by Thomas Baumgart
Modified: 2024-08-23 10:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 8.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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