Display correct trade and tx fees in CSV export #4256
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 toTrade Fee
to indicate that it is the fee the user paid for trading, regardless of Maker/Taker status.Fixes #4207