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

Fix divide by zero errors in Trade history summary. #6466

Merged
merged 1 commit into from Dec 18, 2022
Merged

Fix divide by zero errors in Trade history summary. #6466

merged 1 commit into from Dec 18, 2022

Conversation

ghost
Copy link

@ghost ghost commented Dec 16, 2022

Fixes #6464

Trade history summary was giving div/0 exception for user with no trade history.

image

Copy link
Collaborator

@HenrikJannsen HenrikJannsen left a comment

Choose a reason for hiding this comment

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

NACK

I would not suggest to do that. I think its better to add checks when there are divisions to not have a 0 value. Setting the result to 0 would be inverse to the infinite result from a division by 0.

@ghost
Copy link
Author

ghost commented Dec 17, 2022

Re-written as suggested in #6466 (review)

By the way, the desired result for the trade fee percentage is zero when there are no trades, as seen in the screenshot above.

Copy link
Collaborator

@HenrikJannsen HenrikJannsen left a comment

Choose a reason for hiding this comment

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

utACK

@ripcurlx ripcurlx added this to the v1.9.8 milestone Dec 18, 2022
Copy link
Contributor

@alejandrogarcia83 alejandrogarcia83 left a comment

Choose a reason for hiding this comment

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

utACK

@alejandrogarcia83 alejandrogarcia83 merged commit 582893a into bisq-network:master Dec 18, 2022
@ripcurlx ripcurlx modified the milestones: v1.9.8, v1.9.7 Dec 19, 2022
@ghost ghost mentioned this pull request Jan 9, 2023
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

Successfully merging this pull request may close these issues.

show summary under portfolio history error, log attached
3 participants