fix(types): resolve typecheck errors in AddressTransactionSearch and NavbarLogo#263
Merged
AugustoL merged 2 commits intoopenscan-explorer:release/v1.2.2-afrom Feb 27, 2026
Conversation
…rLogo Add explicit type parameters to extractData calls in AddressTransactionSearch to fix 18 type errors on untyped tx/block/receipt objects. Add vite/client types to tsconfig.json to resolve import.meta.env type error in NavbarLogo.
|
🚀 Preview: https://pr-263--openscan.netlify.app |
MatiasOS
approved these changes
Feb 27, 2026
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.
Description
Fix all 19 TypeScript type errors reported by
bun run typecheck/npm run typecheck, restoring a clean typecheck build.Related Issue
Closes #260
Type of Change
Changes Made
src/services/AddressTransactionSearch.ts: Added explicit type parameters to threeextractDatacalls that were missing them, causing 18 type errors where properties were accessed on{}extractData(txResult.data)→extractData<EthTransaction | null>(txResult.data)extractData(receiptResult.data)→extractData<EthTransactionReceipt | null>(receiptResult.data)extractData(blockResult.data)→extractData<EthBlock | null>(blockResult.data)tsconfig.json: Added"types": ["vite/client"]to compiler options soimport.meta.envis properly typed, fixing the 1 type error in NavbarLogoScreenshots (if applicable)
N/A
Checklist
npm run format:fixandnpm run lint:fixnpm run typecheckwith no errorsnpm run test:runAdditional Notes
All 19 errors (18 in AddressTransactionSearch.ts + 1 in NavbarLogo.tsx) are resolved.
npm run typechecknow completes with zero errors.