feat: Download receipt as csv#880
feat: Download receipt as csv#880C0mberry wants to merge 30 commits intosolana-foundation:masterfrom
Conversation
|
@C0mberry is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
Let's consider adding tests for CSV into the receipt.e2e |
4daccce to
07cdfb5
Compare
Greptile SummaryThis PR adds CSV export for Solana receipts, complementing the existing PDF download. A new Key observations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ReceiptView
participant ReceiptContent (receipt-page.tsx)
participant generateReceiptCsv
participant fast-csv
participant Browser
User->>ReceiptView: clicks "Download" popover
ReceiptView-->>User: shows CSV + PDF buttons
User->>ReceiptView: clicks "CSV"
ReceiptView->>ReceiptContent (receipt-page.tsx): downloadCsv()
ReceiptContent (receipt-page.tsx)->>generateReceiptCsv: generateReceiptCsv(receipt, signature, usdValue)
generateReceiptCsv->>generateReceiptCsv: buildReceiptCsvRow() → sanitizeCsvField(memo)
generateReceiptCsv->>fast-csv: writeToString([row], { headers })
fast-csv-->>generateReceiptCsv: CSV string
generateReceiptCsv->>Browser: new Blob → createObjectURL → <a>.click()
Browser-->>User: file download (solana-receipt-{sig}.csv)
generateReceiptCsv->>Browser: revokeObjectURL(url)
Reviews (2): Last reviewed commit: "added sanitizeCsvField" | Re-trigger Greptile |
|
@greptile-apps check again |
|
Could you check, please, that by sending the event to GA we can distinct PDF receipt from the CSV one |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
f07e9dd to
ff1162e
Compare
Description
Type of change
Screenshots
solana-receipt.csv
Testing
http://localhost:3000/tx/2kHbPUGzehenUXQbBfAVZGcuTrSUVDMEyU2aGcjFbuUAJkG28CyQPCGZF68u369MU7WHMvJboyioqyihvtR75nLn?view=receipt&cluster=mainnet-beta
Related Issues
HOO-327/
Checklist
build:infoscript to update build information