Enhancement: support another ghostfolio breaking API change (#3987)

pull/3993/head
shamoon 2 months ago committed by GitHub
parent 295c6ea796
commit 1eb6ac6d90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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", {

Loading…
Cancel
Save