{formatQuarter(d.date)}
@@ -88,6 +138,15 @@ export default function CapitalChart({ points }: { points: CapitalPoint[] }) {
{s.label}
))}
+ {showBtc && (
+
+
+ In bitcoin (right axis)
+
+ )}
);
diff --git a/frontend/src/portal/InvestorPortalView.tsx b/frontend/src/portal/InvestorPortalView.tsx
index c9a4a8b..c2b9eb1 100644
--- a/frontend/src/portal/InvestorPortalView.tsx
+++ b/frontend/src/portal/InvestorPortalView.tsx
@@ -471,12 +471,18 @@ function HistorySection({ history }: { history: CapitalAccount[] }) {
const [showChart, setShowChart] = useState(false);
if (history.length < 2) return null;
+ // Total value (NAV + distributions received) in BTC at each statement date's price —
+ // the time-series of the "In bitcoin terms" box. Null until prices cover that date.
const chartPoints: CapitalPoint[] = history.map((a) => ({
date: a.as_of_date,
value: a.ending_balance_cents,
paidIn: a.contributions_cents,
distributions: a.distributions_cents,
+ btcValue: a.btc_price_cents
+ ? (a.ending_balance_cents + a.distributions_cents) / a.btc_price_cents
+ : null,
}));
+ const hasBtc = history.some((a) => a.btc_price_cents);
return (
@@ -502,6 +508,7 @@ function HistorySection({ history }: { history: CapitalAccount[] }) {
Paid-in |
Distributions |
Ending balance |
+ {hasBtc && In bitcoin | }
@@ -511,6 +518,13 @@ function HistorySection({ history }: { history: CapitalAccount[] }) {
{formatMoneyExact(a.contributions_cents)} |
{formatMoneyExact(a.distributions_cents)} |
{formatMoneyExact(a.ending_balance_cents)} |
+ {hasBtc && (
+
+ {a.btc_price_cents
+ ? formatBtc(a.ending_balance_cents + a.distributions_cents, a.btc_price_cents)
+ : "—"}
+ |
+ )}
))}
diff --git a/frontend/src/version.ts b/frontend/src/version.ts
index 6ba8fcd..0940ed9 100644
--- a/frontend/src/version.ts
+++ b/frontend/src/version.ts
@@ -1,4 +1,4 @@
// Bumped each release so the running build is visible in the UI.
// If the number shown in the app doesn't match the installed s9pk version,
// the new frontend isn't actually being served.
-export const APP_VERSION = "0.2.39";
+export const APP_VERSION = "0.2.40";