Skip to content
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

[UI] History - fix CJ group amounts (alternative) #11839

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

soosr
Copy link
Collaborator

@soosr soosr commented Oct 30, 2023

fixes #11818
closes #11838

@@ -40,7 +40,7 @@ public partial class TransactionModel : ReactiveObject

public Money? Fee { get; init; }

public Money Amount => Math.Abs(IncomingAmount ?? OutgoingAmount ?? Money.Zero);
public Money Amount => IncomingAmount ?? -(OutgoingAmount ?? Money.Zero);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the amount should be either negative or positive, depending if it was an outgoing or incoming transaction.

Previously it was always positive which was misleading.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYM? What is this amount field?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yahiheb the TransactionModel.Amount property is a unification of the IncomingAmount and OutgoingAmount (as shown above) and is used in several places in the UI logic that creates the transaction tree (TransactionTreeBuilder). In the future if these columns are unified in the UI the Amount value can be displayed in the UI as well.

Copy link
Collaborator

@yahiheb yahiheb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imo this is not the correct solution.
Check my review here #11838 (review)

Copy link
Collaborator

@ichthus1604 ichthus1604 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK.

@ichthus1604 ichthus1604 dismissed yahiheb’s stale review October 31, 2023 02:20

This PR fixes a bug currently on master.

@ichthus1604 ichthus1604 merged commit 7638923 into WalletWasabi:master Oct 31, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] History: coinjoins fee shown as received and CJ's details shows 0 fee
3 participants