Skip to content

Bug: Incorrect currency conversion in holding total return #2051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 of 9 tasks
ttkjakub opened this issue Apr 3, 2025 · 1 comment
Open
4 of 9 tasks

Bug: Incorrect currency conversion in holding total return #2051

ttkjakub opened this issue Apr 3, 2025 · 1 comment

Comments

@ttkjakub
Copy link

ttkjakub commented Apr 3, 2025

Before you start (required)

General checklist

  • I have removed personal / sensitive data from screenshots and logs
  • I have searched existing issues and discussions to ensure this is not a duplicate issue

How are you using Maybe?

  • I am a paying Maybe customer (hosted version)
    • Paying Maybe users can also open requests in Intercom (if there is sensitive info involved)
  • I am a self-hosted user

Self hoster checklist

If you are a self-hosted user, please complete all of the information below. Issues with incomplete information will be marked as Needs Info to help our small team prioritize bug fixes.

  • Self hosted app commit SHA (find in user menu): 02bfa9f
    • I have confirmed that my app's commit is the latest version of Maybe
  • Where are you hosting?
    • Render
    • Docker Compose
    • Umbrel
    • Other (please specify)

Bug description

"Total return" of a holding in an investment account is wrong if trades have different currency from the account itself.

To Reproduce

Steps to reproduce the behavior:

  1. Create an investment account in your primary currency (SEK in my case)
  2. Add a new trade in a different currency (e.g. buy 1 AAPL for 204 USD - current market price at the time of writing this)
  3. Observe that:
  4. the total return is wrong (should be around 0 since we bought the stock at the current market price);
  5. and that the average cost is shown with a wrong currency symbol

Expected behavior

Currencies should be correct converted when calculating total return of a holding

Screenshots and/or recordings

The following screenshot demonstrates both issues:

  • in blue: average cost should show $204 USD (or be correctly converted to SEK)
  • in red: total return and trend should be around 0
Image
@Ripwords
Copy link

Image

The issue applies to other areas of the application as well, when currencies are mixed, the default account's currency is used regardless of what each transaction's selected currency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants