feat(portfolio): add CSV export for trade history - #897
Open
Risktaker001 wants to merge 5 commits into
Open
Conversation
|
@Risktaker001 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Four source files had two versions of the same code concatenated together (likely from a bad merge), producing parse errors in eslint: KeySimulationTool.tsx, SlippageToleranceSelector.tsx, slippageTolerance.utils.ts, and their test files. Kept the newer (accesslayerorg#875/accesslayerorg#877) versions that match the test expectations. Also fixed react-hooks/exhaustive-deps warning in BatchBuyModal by copying debounceTimers.current to a local variable in the cleanup effect. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
…r props TradeDialog and LandingPage import DEFAULT_SLIPPAGE_TOLERANCE_PERCENT, SlippageBounds, and computeSlippageBounds from the old (accesslayerorg#872) API, and render SlippageToleranceSelector with value/onChange/disabled props. Added those exports back alongside the new (accesslayerorg#877) ones and made the selector component accept both prop interfaces via a discriminated union. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Member
|
CI is green but this PR has a merge conflict with dev and cannot be auto-merged. Pull the latest dev into your branch with git fetch origin && git checkout your-branch && git merge origin/dev, resolve any conflicts, then run npm run build and npm run lint to confirm everything is clean before pushing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #857
Summary
Adds a CSV export feature to the portfolio page trade history tab, allowing authenticated users to download their complete trade history for off-platform analysis and tax reporting.
Changes
UI Integration: Added an Export CSV button with a loading state/spinner to the trade history tab header.
Data Fetching: Configured trade export to fetch all records via
GET /users/:wallet/tradeswithout pagination limits on click.CSV Generation & Download:
Formatted output with required columns:
Date,Key Name,Type,Quantity,Price per Key,Total, andFee.Triggered browser file download with the dynamic filename format:
trades-[wallet-truncated]-[date].csv.Access Control: Restricted button access to authenticated wallet sessions only.
Verification
trades-[wallet-truncated]-[date].csvconvention.