fix: resolve critical bugs and enhance project#47
Merged
Conversation
The transaction store contained duplicate imports and broken TypeScript syntax after a merge conflict resolution. This commit restores the file to a clean, working state and adds DevTools middleware for debugging.
The wallet store was missing loading, error, setLoading, setError, setConnected, and reset properties that the useWallet hook expected. This caused runtime errors when trying to connect or disconnect wallets. Added all missing state and actions to restore full functionality.
useWallet.ts was importing walletService as a default export and calling fetchBalances(), neither of which existed. Switched to namespace import and used the correct getWalletBalance() method from walletService.ts. fix(navbar): wire up wallet connect button The Navbar 'Connect Wallet' button was a non-functional placeholder. Added the useWallet hook, onClick handler, and loading state to both desktop and mobile wallet buttons so users can actually connect Freighter.
Wrapped the application layout with the Navbar component and react-hot-toast Toaster so navigation and notifications are available on every page.
The build failed because @hookform/resolvers/zod was not installed. Added @hookform/resolvers package and fixed the Asset import in walletService.ts from 'import type' to a value import so it can be used as a value. Also added eslint-disable comments for intentional useEffect dependencies.
Eliminates react-hooks/exhaustive-deps warnings in dashboard and history pages by properly memoizing the store actions. Also removed the eslint-disable comments and added fetchTransactions to the dependency arrays.
Added @typescript-eslint/parser, @typescript-eslint/eslint-plugin, and eslint-plugin-react-hooks to enforce stricter linting rules including: - no-unused-vars - no-explicit-any - no-console - react-hooks rules-of-hooks and exhaustive-deps
…to avoid shadowing built-in types
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.
Summary
This PR resolves 4 critical issues and adds extensive enhancements to the project.
Issues Resolved
toastimport inuseTransactions.tsthat caused build failuresPartialandAwaitedtoOptionalandUnwrapPromiseto avoid shadowing TypeScript built-in typesWalletStateinterface fromtypes/wallet.tsas anycast inFormInput.test.tsxEnhancements
useDebounceanduseLocalStoragehooksrobots.ts,sitemap.ts, andnot-found.tsxVerification