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

Display correct trade and tx fees in CSV export #4256

Merged
merged 1 commit into from May 25, 2020
Merged

Display correct trade and tx fees in CSV export #4256

merged 1 commit into from May 25, 2020

Conversation

ghost
Copy link

@ghost ghost commented May 12, 2020

When exporting trade history to CSV, users would expect to see their own transaction and trade fees listed. Maker fees are stored on the Offer, Taker fees are stored on the Trade object.
The code was not properly checking whether the user was the Offer Maker or Taker, and as such the report was always displaying the Taker information for Tx and Trade fee. Therefore any trades where the user was Maker showed the wrong fees.

The column title Maker Fee is incorrect and misleading since the user doing the export is not necessarily the Maker. We rename this column to Trade Fee to indicate that it is the fee the user paid for trading, regardless of Maker/Taker status.

Fixes #4207

When exporting trade history to CSV, users would expect to see
their own transaction and trade fees listed.  Maker fees are
stored on the Offer, Taker fees are stored on the Trade object.
The code was not properly checking whether the user was the
Offer Maker or Taker, and as such the report was always displaying
the Taker information for Tx and Trade fee.  Therefore any trades
where the user was Maker showed the wrong fees.

The column title `Maker Fee` is incorrect and misleading since
the user doing the export is not necessarily the Maker.  We
rename this column to `Trade Fee` to indicate that it is the fee
the user paid for trading regardless of Maker/Taker status.

Fixes #4207
@ghost
Copy link
Author

ghost commented May 12, 2020

Testing

  • I generated the CSV export against my trade history in pre and post environments, then compared the files with Meld Diff Viewer. Noted that the trades in which I was Maker the fees changed to reflect the correct values from the Offer object.

@ghost ghost mentioned this pull request May 15, 2020
@ghost
Copy link

ghost commented May 16, 2020

Code 👍, I only add that I strongly suggest to write unit-test for this. I believe its easy to write and it will help in the future to a) explain why it is this way, b) prevent part of code from braking in the future.

@sqrrm sqrrm added this to the v1.3.5 milestone May 25, 2020
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@sqrrm sqrrm merged commit 799d48e into bisq-network:master May 25, 2020
@ghost ghost mentioned this pull request Jun 11, 2020
@ghost ghost deleted the fix_trade_fees_export branch September 14, 2020 22:20
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.

Exporting trade history to CSV has incorrect fee values
1 participant