Repository navigation
fix: repair TypeScript build errors (tsc -b) - #36
Merged
Merged
Conversation
- storageKeys: add the missing WALLET_STATE and THEME_PREFERENCE keys referenced by walletCache, storeSlice and themeStore; without them tsc failed and the theme store's zustand `persist` name was undefined - Dashboard: drop two duplicate `useLeaderboard` imports - clearSession: dispatch resetStore() so sign-out clears the in-memory wallet instead of leaking the previous user's balance into the next session (also resolves the unused-import lint)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #35
Problem
tsc -b(i.e.npm run build) fails onmain; CI never caught it because the workflow only runsnpm ci && npm test.Fixes
src/session/storageKeys.ts— add the missingWALLET_STATEandTHEME_PREFERENCEkeys.walletCache.ts,storeSlice.tsandthemeStore.tsalready reference them. Besides unblockingtsc, this fixes a real bug:useThemeStore's zustandpersist({ name: STORAGE_KEYS.THEME_PREFERENCE })was passingundefined, so theme preference was never persisted.src/pages/Dashboard.tsx— remove two duplicateuseLeaderboardimports (it was imported three times).src/session/clearSession.ts— actually dispatchresetStore()on sign-out. It was imported but unused, which meant the previous user's wallet stayed in memory after signing out (and tripped the unused-import lint).clearSessionalso covers the new keys viaObject.values(STORAGE_KEYS).Verification