refactor: tighten types and reuse instrument UI
This commit is contained in:
@@ -67,7 +67,7 @@ function renderPage(ui: React.ReactNode) {
|
||||
);
|
||||
}
|
||||
|
||||
const portfolio: Portfolio
|
||||
const portfolio
|
||||
= {
|
||||
cashBalances: [{ currency: "USD", value: "0.5" }],
|
||||
isStale: true,
|
||||
@@ -97,10 +97,10 @@ const portfolio: Portfolio
|
||||
ticker: null,
|
||||
type: "BOND",
|
||||
},
|
||||
],
|
||||
] satisfies [Portfolio["positions"][number], ...Portfolio["positions"]],
|
||||
structure: { currencies: [], unvaluedCategories: [] },
|
||||
totalsByCurrency: [{ currency: "RUB", value: "1234.5" }],
|
||||
};
|
||||
} satisfies Portfolio;
|
||||
|
||||
function position(
|
||||
overrides: Partial<Portfolio["positions"][number]>,
|
||||
|
||||
Reference in New Issue
Block a user