From 1eb6ac6d9004c12603d59daac6d90eed80800fc5 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:19:18 -0700 Subject: [PATCH] Enhancement: support another ghostfolio breaking API change (#3987) --- src/widgets/ghostfolio/component.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/ghostfolio/component.jsx b/src/widgets/ghostfolio/component.jsx index 747fdabfc..183b05ca7 100644 --- a/src/widgets/ghostfolio/component.jsx +++ b/src/widgets/ghostfolio/component.jsx @@ -6,7 +6,9 @@ import useWidgetAPI from "utils/proxy/use-widget-api"; function getPerformancePercent(t, performanceRange) { // ghostfolio v2.79.0 changed to grossPerformancePercentage + // ghostfolio v2.106.0 changed to netPerformancePercentageWithCurrencyEffect const percent = + performanceRange.performance.netPerformancePercentageWithCurrencyEffect ?? performanceRange.performance.grossPerformancePercentage ?? performanceRange.performance.currentGrossPerformancePercent; return `${percent > 0 ? "+" : ""}${t("common.percent", {