fix(account): show source metadata on empty account and income (WealthLedger/frontend#55)
Frontend verify / commits (pull_request) Successful in 30s
Frontend verify / security (pull_request) Successful in 9s
Frontend verify / verify (pull_request) Successful in 5m20s

Share the brokerage access-loss predicate across client, resource query and account VM.
This commit is contained in:
2026-11-03 06:36:16 +03:00
parent 71fbe7774d
commit 2bb5ee08be
12 changed files with 131 additions and 33 deletions
+11 -1
View File
@@ -41,4 +41,14 @@ function isApiErrorCode(
return value === expected;
}
export { ApiErrorCode, apiErrorCode, isApiErrorCode };
// Confirmed loss of access to the brokerage data. UNAUTHORIZED is a session
// failure with its own refresh/sign-out path, so it is deliberately excluded.
function isBrokerageAccessLoss(code?: string): boolean {
return [
ApiErrorCode.InvalidTbankToken,
ApiErrorCode.NotFound,
ApiErrorCode.TbankNotConnected,
].some(loss => isApiErrorCode(code, loss));
}
export { ApiErrorCode, apiErrorCode, isApiErrorCode, isBrokerageAccessLoss };