Skip to content

[Frontend] Separate server data from mutable UI state #19

Description

@grantfox-oss

Files affected : Frontend/src/stores/index.ts, Frontend/src/hooks/useVault.ts, Frontend/src/hooks/useWallet.ts, Frontend/src/lib/api.ts, Frontend/src/types/index.ts, Frontend/src/features/vaults/VaultList.tsx, Frontend/src/features/streaks/StreakTracker.tsx, Frontend/src/app/layout.tsx
Description: Zustand currently stores mutable vault balances, streaks, and discipline scores without caching, loading states, invalidation, or refresh behavior.
Acceptance criteria:

Introduce a server-state query/cache layer.

Invalidate financial data on wallet/account/network changes.

Persist only safe UI preferences, not financial source-of-truth data.

Eliminate race conditions between optimistic updates and refreshes.

Metadata

Metadata

Assignees

Labels

Maybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions