Add CoinStats exchange portfolio sync and normalize linked investment charts (#1308)

* [FEATURE] Add CoinStats exchange portfolios and normalize linked investment charts

* [BUGFIX] Fix CoinStats PR regressions

* [BUGFIX] Fix CoinStats PR review findings

* [BUGFIX] Address follow-up CoinStats PR feedback

* [REFACTO] Extract CoinStats exchange account helpers

* [BUGFIX] Batch linked CoinStats chart normalization

* [BUGFIX] Fix CoinStats processor lint

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Anas Limouri
2026-04-01 20:25:06 +02:00
committed by GitHub
parent f63630c0fa
commit a90f9b7317
44 changed files with 2857 additions and 225 deletions

View File

@@ -38,7 +38,7 @@
<%= turbo_frame_tag dom_id(@account, :chart_details) do %>
<div class="px-4">
<%= render partial: "shared/trend_change", locals: { trend: trend, comparison_label: period.comparison_label } %>
<%= render partial: "shared/trend_change", locals: { trend: trend, comparison_label: comparison_label } %>
</div>
<div class="h-64 pb-4">

View File

@@ -69,4 +69,15 @@ class UI::Account::Chart < ApplicationComponent
def trend
series.trend
end
def comparison_label
start_date = series.start_date
return period.comparison_label if start_date.blank?
if start_date > period.start_date
"vs. available history"
else
period.comparison_label
end
end
end