Skip to content

Release#107

Merged
ifaouibadi merged 10 commits intomainfrom
develop
Apr 2, 2026
Merged

Release#107
ifaouibadi merged 10 commits intomainfrom
develop

Conversation

@ifaouibadi
Copy link
Copy Markdown
Member

@ifaouibadi ifaouibadi commented Apr 2, 2026

Note

Medium Risk
Adds new API routes and changes portfolio/pricing data retrieval paths (including cached CoinGecko access), which could affect response shapes/performance and historical pricing behavior if edge cases slip through.

Overview
Adds two new account portfolio endpoints: :address/portfolio/tokens/history to explicitly return per-token PnL (tokens_pnl), and :address/portfolio/pnl-chart.svg to serve a cached SVG sparkline of realized PnL (daily, or hourly for single-day ranges).

Refactors portfolio history/PnL plumbing so tokens_pnl is no longer returned from the general history endpoint unless explicitly requested, and introduces PortfolioService.getPnlTimeSeries() as a lightweight, single-query path for charting (with updated controller/service tests).

Adjusts pricing integration to rely on CoinGeckoService cache/DB-backed getters (no eager fetch on service construction, trims supported interval to daily|hourly, removes minute aggregation/caching in PriceFeedController), and updates dependencies/lockfile (drops mysql2, ts-loader, source-map-support, bumps several packages).

Written by Cursor Bugbot for commit bd7837d. This will update automatically on new commits. Configure here.

CedrikNikita and others added 10 commits April 2, 2026 10:33
…and caching; update AppService to utilize new syncAllFromApi method for initialization and cron job; adjust portfolio service tests to reflect method name changes
… parameters and enhancing error logging; clean up unnecessary whitespace in AppService
…ming logic; ensure rates are only refreshed when null
…rove cache management; streamline price feed controller by removing unused cache manager
…L history with optional date range and interval; enhance portfolio service to support per-token PnL breakdown
…maries and descriptions; update query DTO for clarity on included fields
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

includePnl: true,
useRangeBasedPnl,
includeTokensPnl: true,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated interval/date parsing logic across two controller methods

Low Severity

getTokensPnlHistory duplicates the date-parsing, interval-clamping, and include-field splitting logic from getPortfolioHistory. If the interval calculation or date handling changes in one method but not the other, responses from the two endpoints will silently diverge. Extracting the shared query-to-options mapping into a private helper would keep both endpoints consistent.

Additional Locations (1)
Fix in Cursor Fix in Web

@ifaouibadi ifaouibadi merged commit 508ee5c into main Apr 2, 2026
7 checks passed
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.

2 participants