Fix 68 TypeScript compilation errors across codebase#452
Merged
Conversation
Co-authored-by: jamespepper81 <84083764+jamespepper81@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix TypeScript errors in receive and layout files
Fix 68 TypeScript compilation errors across codebase
Jan 11, 2026
jamespepper81
approved these changes
Jan 11, 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.
TypeScript compilation was failing with 68 strict mode errors across app screens, components, hooks, and services. These errors blocked CI builds and development workflows.
Changes
Wallet Service Integration
clearAddressCacheandgetFirstUnusedReceivingAddressto wallet-store exportspriceQueryin wallet-store balanceData for price queriesType Safety Improvements
ExtendedTransactionDetailsinterface to handle both status object ({confirmed: boolean, block_height?: number}) and status string unionEmitterSubscriptionwithNativeEventSubscriptionin _layout.tsx for appearance listenerstring | numbercache value types in cpfp-service and rbf-service derivation functionsComponent Fixes
platformStylesin EmojiReaction, PremiumButton, and SuccessAnimationdisabledActionButtonstyle to transaction-detailsreadonly [string, string]nullinstead offalseService Fixes
testPrivateKeydeclarations in rbf-service ECC verification blocks (was referencing undefined variable)unknown[]from Array.from()Example fix for cache value handling:
All changes preserve existing runtime behavior while satisfying TypeScript strict mode.
Original prompt
can you look into and try to fix these TypeScript errors?
Error: app/(tabs)/receive.tsx(68,9): error TS2722: Cannot invoke an object which is possibly 'undefined'.
Error: app/(tabs)/receive.tsx(89,37): error TS2722: Cannot invoke an object which is possibly 'undefined'.
Error: app/(tabs)/receive.tsx(89,37): error TS18048: 'walletService.getFirstUnusedReceivingAddress' is possibly 'undefined'.
Error: app/(tabs)/receive.tsx(189,39): error TS2722: Cannot invoke an object which is possibly 'undefined'.
Error: app/(tabs)/receive.tsx(189,39): error TS18048: 'walletService.getFirstUnusedReceivingAddress' is possibly 'undefined'.
Error: app/_layout.tsx(66,5): error TS2740: Type 'NativeEventSubscription' is missing the following properties from type 'EmitterSubscription': emitter, listener, context, eventType, and 2 more.
Error: app/address-details.tsx(52,82): error TS2339: Property 'priceQuery' does not exist on type '{ isCreatingWallet: boolean; setAddressStatsCache: (key: string, stats: { balance: number; }) => void; getAddressStatsCacheValue: (key: string) => { balance: number; } | undefined; getMnemonic: (walletId: string) => Promise<...>; ... 57 more ...; isLoading: boolean; }'.
Error: app/coin-control.tsx(95,33): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(134,35): error TS7006: Parameter 'a' implicitly has an 'any' type.
Error: app/coin-control.tsx(134,38): error TS7006: Parameter 'b' implicitly has an 'any' type.
Error: app/coin-control.tsx(158,68): error TS7006: Parameter 'u' implicitly has an 'any' type.
Error: app/coin-control.tsx(170,29): error TS7006: Parameter 'item' implicitly has an 'any' type.
Error: app/coin-control.tsx(184,31): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(201,15): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(202,12): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(269,15): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(270,16): error TS7006: Parameter 'sum' implicitly has an 'any' type.
Error: app/coin-control.tsx(270,21): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(274,43): error TS7006: Parameter 'sum' implicitly has an 'any' type.
Error: app/coin-control.tsx(274,48): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/coin-control.tsx(605,42): error TS7006: Parameter 'utxo' implicitly has an 'any' type.
Error: app/transaction-details.tsx(46,36): error TS7006: Parameter 't' implicitly has an 'any' type.
Error: app/transaction-details.tsx(432,69): error TS2339: Property 'disabledActionButton' does not exist on type '{ container: { flex: number; }; scrollView: { flex: number; paddingTop: number; }; centerContent: { flex: number; justifyContent: "center"; alignItems: "center"; }; errorText: { textAlign: "center"; fontSize: number; lineHeight: number; letterSpacing: number; fontWeight: "500"; }; ... 27 more ...; refreshText: { ......'.
Error: app/transaction-details.tsx(448,70): error TS2339: Property 'disabledActionButton' does not exist on type '{ container: { flex: number; }; scrollView: { flex: number; paddingTop: number; }; centerContent: { flex: number; justifyContent: "center"; alignItems: "center"; }; errorText: { textAlign: "center"; fontSize: number; lineHeight: number; letterSpacing: number; fontWeight: "500"; }; ... 27 more ...; refreshText: { ......'.
Error: app/transaction-explorer.tsx(86,11): error TS2430: Interface 'ExtendedTransactionDetails' incorrectly extends interface 'Transaction'.
Types of property 'confirmations' are incompatible.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
Error: app/transaction-explorer.tsx(126,42): error TS7006: Parameter 't' implicitly has an 'any' type.
Error: app/transaction-explorer.tsx(147,71): error TS2345: Argument of type '{ usd: number; usd_24h_change: number; USD: { last: number; }; } | undefined' is not assignable to parameter of type '{ usd?: number | undefined; } | null'.
Type 'undefined' is not assignable to type '{ usd?: number | undefined; } | null'.
Error: app/transaction-explorer.tsx(158,55): error TS2345: Argument of type '{ usd: number; usd_24h_change: number; USD: { last: number; }; } | undefined' is not assignable to parameter of type '{ usd?: number | undefined; } | null'.
Type 'undefined' is not assignable to type '{ usd?: number | undefined; } | null'.
Error: app/transaction-explorer.tsx(695,82): error TS2339: Property 'vin' does not exist on type 'Transaction'.
Error: app/transaction-explorer.tsx(696,85): error TS2339: Property 'vout' does not exist on type 'Transaction'.
Error: app/transaction-explorer.tsx(711,47): error TS7006: Parameter 'sum' implicitly has an 'any' type.
Error: app/transaction-explorer.tsx(711,52): error TS7006: Parameter 'vin'...
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.