Merged
Conversation
Extract production log sync script into its own branch. Remove hardcoded default password — SQL_PASSWORD must be set in .env.
* feat: add financial dashboard API endpoint Add admin-only GET /dashboard/financial/log endpoint that queries FinancialDataLog entries from the log table, parses the JSON message field, and returns structured financial data including total balances, plus/minus breakdowns, BTC price, and balances by financial type. Supports daily sampling and date filtering via query parameters. * feat: extend financial dashboard with changes, latest balance, and expenses endpoints - Add /changes and /changes/latest endpoints for fee income tracking - Add /latest endpoint with balance by type and blockchain (stacked) - Add getLatestFinancialLog and getLatestFinancialChangesLog for fast queries - Aggregate small providers/assets (<5k CHF) under "Other" - Return detailed expense breakdowns (ref, binance, blockchain sub-categories) * chore: add test-results to gitignore * feat: add referral reward recipients endpoint to financial dashboard * feat: add script to sync production log entries to local database * refactor: extract sync-prod-logs script to separate PR #3439 * fix: harden financial dashboard for production - Extract BTC price by asset ID lookup instead of >50k heuristic - Add try/catch to getLatestBalance for corrupt JSON messages - Replace `where: any` with FindOptionsWhere<Log> in repository * style: fix prettier formatting * fix: bind subquery parameters explicitly and validate from date - Bind :system/:subsystem/:severity on subquery and propagate via setParameters() instead of relying on outer query parameter names - Validate from query param: reject invalid dates with 400 * fix: return 404 instead of empty body when no financial data exists
Add kycLogs to the /support/:id response so the compliance UI can display the full KYC audit trail per user. Uses QueryBuilder to bypass TypeORM table-inheritance discriminator filtering. Also adds KYC step and log test data to the local seed script.
* feat: add custody order list and approval endpoints for admin * fix: remove fallback values from CustodyOrderListEntry DTO
The getChangeLog() method excluded blockchain fees (cryptoInputFee, payoutOrderFee, tradingOrderFee) from totalMinus, causing the net total on the financial dashboard to be overstated. Also expose bank and kraken expense categories in the changes DTO for full transparency. Refs #3438
* Update chargeback bank fee rate from 0.1% to 1% * Fix migration code style to match prettier config * Fix migration timestamp to run after all existing migrations
davidleomay
approved these changes
Mar 17, 2026
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.
Automatic Release PR
This PR was automatically created after changes were pushed to develop.
Commits: 1 new commit(s)
Checklist