Typecheck fixes main#78
Merged
Merged
Conversation
- Add useOptimisticTransactions import to group-details.tsx - Fix STELLAR_RPC_URL export in web3-provider.tsx and update yield-dashboard.tsx - Add missing rpc import to yield-dashboard.tsx Resolves TypeScript errors: - frontend/components/group/group-details.tsx(39,31): error TS2304: Cannot find name 'useOptimisticTransactions'. - frontend/components/group/yield-dashboard.tsx(15,18): error TS2459: Module 'useJointSaveContracts' declares 'STELLAR_RPC_URL' locally, but it is not exported. - frontend/components/group/yield-dashboard.tsx(48,18): error TS2503: Cannot find namespace 'rpc'. Now all 3 of the original TypeScript errors (4 errors total when including the 4th already fixed in PR JointSave-org#74) are resolved. Front end CI (JointSave-org#54) can now pass cleanly. Co-authored-by: openhands <openhands@all-hands.dev>
- Add proper type guard for LedgerEntryResult to safely access xdr property - Check entry type before accessing properties to prevent runtime errors Fixes TypeScript error: - frontend/hooks/useJointSaveContracts.ts(662,28): error TS2339: Property 'xdr' does not exist on type 'LedgerEntryResult'. This error was already covered in PR JointSave-org#74, but now resolved comprehensively with proper type safety. Co-authored-by: openhands <openhands@all-hands.dev>
Add comprehensive documentation of TypeScript error fixes for issue JointSave-org#75. - Documents all 4 TypeScript errors that were blocking frontend CI (JointSave-org#54) - Describes the fixes applied to resolve missing imports, export issues, and type mismatches - Provides clear impact analysis and verification status - Links directly to issue JointSave-org#75 for automatic closing on merge Co-authored-by: openhands <openhands@all-hands.dev>
Sendi0011
reviewed
Jun 20, 2026
Sendi0011
left a comment
Contributor
There was a problem hiding this comment.
@Phantomcall i Pulled this and verified everything directly rather than just reading the writeup — tsc --noEmit exits clean, and a full npm run build completes successfully with all routes generated. Checked the LedgerEntryResult fix specifically since type guards are easy to fake with a blanket cast — this one's genuine, using real "xdr" in entry narrowing. Also checked for a circular import risk since STELLAR_RPC_URL moved to be re-exported from web3-provider.tsx — none found, and it's actually a better single-source-of-truth than what I originally suggested in the issue. Approving — this is exactly the fix needed, no concerns.
Author
|
Thank you so much @Sendi0011 |
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.
TypeScript Error Fixes for Main Branch
Issue Summary
Fixed 4 TypeScript errors in the main branch that were causing frontend CI (#54) to fail and creating noise for developers running typechecks locally.
Errors Fixed
Error 1 - Missing import in group-details.tsx
frontend/components/group/group-details.tsx:39Error 2 - STELLAR_RPC_URL not exported
frontend/components/group/yield-dashboard.tsx:15STELLAR_RPC_URLfromfrontend/components/web3-provider.tsxalong with other Stellar network configuration constantsfrontend/components/group/yield-dashboard.tsxto importSTELLAR_RPC_URLfrom@/components/web3-providerinstead of@/hooks/useJointSaveContractsError 3 - Missing rpc namespace import
frontend/components/group/yield-dashboard.tsx:48rpcto the Stellar SDK import infrontend/components/group/yield-dashboard.tsx:Error 4 - LedgerEntryResult type mismatch (from PR #74)
frontend/hooks/useJointSaveContracts.ts:662LedgerEntryResultbefore accessing xdr property:Files Modified
frontend/components/group/group-details.tsxuseOptimisticTransactionsimport@/hooks/useOptimisticTransactionsfrontend/components/group/yield-dashboard.tsxrpcimportrpcto Stellar SDK import statementSTELLAR_RPC_URLimport from@/hooks/useJointSaveContractsto@/components/web3-providerfrontend/components/web3-provider.tsxSTELLAR_RPC_URLconstantSTELLAR_RPC_URLalong with other network constantsfrontend/hooks/useJointSaveContracts.tsentry.xdrVerification
tsc --noEmitnow exits with zero errors@ts-ignoreor@ts-expect-errorsuppressions were usedgroup-details.tsxoptimistic transaction flow manually verified to work correctlyyield-dashboard.tsxmanually verified to load and display data correctlyImpact
tsc --noEmitlocally will no longer see pre-existing noise caused by TypeScript errors unrelated to their changesRelated Information
Closes #75