fix: align audit findings for Events, currency and auth (WealthLedger/frontend#155)
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 10s
Frontend verify / verify (push) Failing after 7m7s

This commit was merged in pull request #156.
This commit is contained in:
2026-11-05 07:23:07 +03:00
parent cadba8d075
commit 668f2ef70e
11 changed files with 75 additions and 8 deletions
@@ -18,6 +18,7 @@ import {
type AccountEventsPageViewModel
= | {
allAccounts: boolean;
calculatedAt: string;
canApply: boolean;
draftPeriod: [null | string, null | string];
events: BrokerageEvent[];
@@ -31,6 +32,7 @@ type AccountEventsPageViewModel
source?: InvestmentResourceMeta;
state: "loaded";
totalVisible: boolean;
window: { from: string; to: string };
}
| {
onReset: () => void;
@@ -110,6 +112,7 @@ function useAccountEventsPageVm(): AccountEventsPageViewModel {
return {
allAccounts: accountId === "all",
calculatedAt: events.data.calculatedAt,
canApply:
(draftFrom !== appliedFrom || draftTo !== appliedTo)
&& isValidPeriod(draftFrom, draftTo),
@@ -133,6 +136,7 @@ function useAccountEventsPageVm(): AccountEventsPageViewModel {
source: events.meta,
state: "loaded",
totalVisible: events.meta?.completeness === "complete",
window: events.data.window,
};
}