feat: group all-account rows by instrument and day (WealthLedger/main#47) (#126)
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 9s
Frontend verify / verify (push) Failing after 6m1s

This commit was merged in pull request #126.
This commit is contained in:
2026-10-30 07:28:19 +03:00
parent 6792f5b70a
commit 71126c91f0
40 changed files with 1564 additions and 102 deletions
+10 -1
View File
@@ -33,6 +33,7 @@ type AccountPageRecentOperations
stale?: boolean;
state: "loaded" | "partial";
to: string;
totalVisible?: boolean;
}
| {
state: "empty"
@@ -84,6 +85,7 @@ function toRecentEvents(
items: events.data?.events.slice(0, RECENT_EVENTS_LIMIT) ?? [],
state: "partial",
to,
totalVisible: false,
};
if (!events.data && (events.isError || events.meta?.lastAttempt.state === "failed"))
return { state: "error", to };
@@ -94,6 +96,7 @@ function toRecentEvents(
items,
state: "loaded",
to,
totalVisible: events.meta?.completeness === "complete",
};
}
@@ -109,7 +112,12 @@ function toRecentOperations(
)
return { state: "loading", to };
if (operations.meta?.completeness === "incomplete")
return { items: operations.data?.items ?? [], state: "partial", to };
return {
items: operations.data?.items ?? [],
state: "partial",
to,
totalVisible: false,
};
if (
!operations.data
&& (operations.isError || operations.meta?.lastAttempt.state === "failed")
@@ -125,6 +133,7 @@ function toRecentOperations(
stale: operations.meta?.freshness === "stale",
state: "loaded",
to,
totalVisible: operations.meta?.completeness === "complete",
};
}