Skip to content

Improve trade export to csv #4532#4646

Open
puchis0323 wants to merge 1 commit intobisq-network:mainfrom
puchis0323:feature/improve-csv-export
Open

Improve trade export to csv #4532#4646
puchis0323 wants to merge 1 commit intobisq-network:mainfrom
puchis0323:feature/improve-csv-export

Conversation

@puchis0323
Copy link
Copy Markdown
Contributor

@puchis0323 puchis0323 commented Apr 11, 2026

his PR adds the missing Price column to the Bisq Easy CSV export functionality.
I have used the standard AmountFormatter to ensure the currency formatting matches the rest of the application's UI.
Variable Extraction: Added price extraction logic using trade.getPriceQuote().getQuoteSideMonetary().
Formatting: Implemented AmountFormatter.formatQuoteAmountWithCode to ensure the price is exported with the correct currency symbol and decimal precision.
CSV Header: Included the localized header bisqEasy.openTrades.table.price in the CSV header list.
Data Injection: Inserted the formatted price value into the corresponding position within the exported data structure.

Summary by CodeRabbit

  • New Features
    • Trade exports now include a price column in CSV format for enhanced data visibility.
  • Refactor
    • Code formatting and indentation improvements.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5f0fd805-2f12-4140-b0d5-8b703bfc44ad

📥 Commits

Reviewing files that changed from the base of the PR and between 7230a73 and 7ddc357.

📒 Files selected for processing (1)
  • apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/OpenTradesUtils.java

Walkthrough

The OpenTradesUtils class is enhanced to include formatted price information in trade exports. The exportTrade() method now computes and appends a formatted price column derived from the trade's price quote, while parameter formatting in requestMediation() is realigned.

Changes

Cohort / File(s) Summary
Trade Export Enhancement
apps/desktop/desktop/src/main/java/bisq/desktop/main/content/bisq_easy/open_trades/trade_state/OpenTradesUtils.java
Added price computation and CSV export column in exportTrade() using trade.getPriceQuote().getQuoteSideMonetary() with localized header bisqEasy.openTrades.table.price. Parameter indentation adjusted in requestMediation(). Removed trailing newline from file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A price for each trade, now displayed with care,
CSV columns expanded, data beyond compare,
Formatted quotes dancing in every row,
The export grows richer, watch the prices flow! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Improve trade export to csv' directly addresses the main change: adding a missing Price column to the CSV export functionality.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant