From 62cd311d82a4c05701fb0747df1e1510d9e9bf59 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 2 Apr 2026 11:23:50 -0300 Subject: [PATCH 1/3] KeySettings: Fix - remove old LogAction by logManager --- src/navigation/wallet/screens/KeySettings.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/navigation/wallet/screens/KeySettings.tsx b/src/navigation/wallet/screens/KeySettings.tsx index 7296d4752c..e5a89bd407 100644 --- a/src/navigation/wallet/screens/KeySettings.tsx +++ b/src/navigation/wallet/screens/KeySettings.tsx @@ -53,9 +53,7 @@ import { import { buildAccountList, buildWalletObj, - checkEncryptPassword, checkPrivateKeyEncrypted, - generateKeyExportCode, mapAbbreviationAndName, } from '../../../store/wallet/utils/wallet'; import {Key} from '../../../store/wallet/wallet.models'; @@ -76,7 +74,7 @@ import {useTheme} from 'styled-components/native'; import {IsSVMChain, IsVMChain} from '../../../store/wallet/utils/currency'; import {useOngoingProcess, useTokenContext} from '../../../contexts'; import {isTSSKey} from '../../../store/wallet/effects/tss-send/tss-send'; -import {LogActions} from '../../utils/logging'; +import {logManager} from '../../../managers/LogManager'; const WalletSettingsContainer = styled.SafeAreaView` flex: 1; @@ -184,7 +182,7 @@ const KeySettings = () => { cta(decryptedKey); } catch (e: any) { const errStr = e instanceof Error ? e.message : JSON.stringify(e); - Logger.error('[KeySettings] Decrypt Error', errStr); + logManager.error('[KeySettings] Decrypt Error', errStr); await dispatch(AppActions.dismissDecryptPasswordModal()); await sleep(500); // Wait to close Decrypt Password modal dispatch(showBottomNotificationModal(WrongPasswordError())); From ecae31e9d423afac2d35adf73d1985f829815ad9 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 2 Apr 2026 11:27:39 -0300 Subject: [PATCH 2/3] Exclude mocks folder to tsconfig --- tsconfig.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index b1a4aa48e8..0a200828b3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -61,6 +61,14 @@ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, "exclude": [ - "node_modules", "babel.config.js", "metro.config.js", "jest.config.js", "android", "ios", "**/node_modules", "**/Pods" + "node_modules", + "babel.config.js", + "metro.config.js", + "jest.config.js", + "android", + "ios", + "**/node_modules", + "**/Pods", + "__mocks__" ] } From 8ec59b5e007f7b810ffd85bcab879e2c8665b762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Edgardo=20Baz=C3=A1n?= Date: Thu, 2 Apr 2026 11:54:03 -0300 Subject: [PATCH 3/3] Validate: Fix - general fixes for validate script (#10) --- declarations.d.ts | 2 ++ .../modal/bottom-notification/BottomNotification.tsx | 4 ++-- src/constants/config.ts | 1 - src/navigation/tabs/home/hooks/usePortfolioAssetRows.ts | 3 ++- .../tabs/settings/about/screens/PortfolioWalletDebug.tsx | 2 +- src/store/card/card.effects.ts | 4 ++-- tsconfig.json | 1 + 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index dd3b8e16ee..0ccacc1d42 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -30,4 +30,6 @@ declare module '@env' { export const BASESCAN_API_KEY: string; export const TEST_MODE_NETWORK: string; export const SENTRY_DSN: string; + export const REGTEST_BASE_BITPAY_URL: string; + export const STATIC_CONTENT_CARDS_ENABLED: string; } diff --git a/src/components/modal/bottom-notification/BottomNotification.tsx b/src/components/modal/bottom-notification/BottomNotification.tsx index 62025ce345..4106506c36 100644 --- a/src/components/modal/bottom-notification/BottomNotification.tsx +++ b/src/components/modal/bottom-notification/BottomNotification.tsx @@ -1,4 +1,4 @@ -import React, {ReactChild, useEffect, useMemo, useCallback} from 'react'; +import React, {ReactNode, useEffect, useMemo, useCallback} from 'react'; import {Platform} from 'react-native'; import {ScrollView} from 'react-native-gesture-handler'; import SheetModal from '../base/sheet/SheetModal'; @@ -40,7 +40,7 @@ export interface BottomNotificationConfig { action: (rootState: RootState) => any; }>; code?: string; - message2?: ReactChild; + message2?: ReactNode; enableBackdropDismiss: boolean; onBackdropDismiss?: () => void; } diff --git a/src/constants/config.ts b/src/constants/config.ts index 48dcd190ef..3dfa1f8652 100644 --- a/src/constants/config.ts +++ b/src/constants/config.ts @@ -1,4 +1,3 @@ -// @ts-ignore import { REGTEST_BASE_BITPAY_URL, STATIC_CONTENT_CARDS_ENABLED as STATIC_CONTENT_CARDS_ENABLED_ENV, diff --git a/src/navigation/tabs/home/hooks/usePortfolioAssetRows.ts b/src/navigation/tabs/home/hooks/usePortfolioAssetRows.ts index 1925b0bbbb..be90040019 100644 --- a/src/navigation/tabs/home/hooks/usePortfolioAssetRows.ts +++ b/src/navigation/tabs/home/hooks/usePortfolioAssetRows.ts @@ -123,7 +123,8 @@ const usePortfolioAssetRows = ({gainLossMode, keyId}: Args): Result => { return getDisplayAssetRowItems(items); }, [items]); - const populateLoadingByKeyPrevRef = useRef>(); + const populateLoadingByKeyPrevRef = + useRef>(undefined); const isPopulateLoadingByKey = useMemo(() => { if (!isPopulateInProgress || !walletIdsByAssetKey) { return undefined; diff --git a/src/navigation/tabs/settings/about/screens/PortfolioWalletDebug.tsx b/src/navigation/tabs/settings/about/screens/PortfolioWalletDebug.tsx index de5befc2e0..cb237cbfd2 100644 --- a/src/navigation/tabs/settings/about/screens/PortfolioWalletDebug.tsx +++ b/src/navigation/tabs/settings/about/screens/PortfolioWalletDebug.tsx @@ -557,7 +557,7 @@ const PortfolioWalletDebug = ({ 'WALLET', ], }); - portfolioRaw = decrypt.out(parsed as any, 'PORTFOLIO'); + portfolioRaw = decrypt.out(parsed as any, 'PORTFOLIO', undefined); } catch (e) { portfolioRaw = null; } diff --git a/src/store/card/card.effects.ts b/src/store/card/card.effects.ts index 99f16331ba..cd4988c16d 100644 --- a/src/store/card/card.effects.ts +++ b/src/store/card/card.effects.ts @@ -599,8 +599,8 @@ export const startAddToGooglePay = const errMsg = err instanceof Error ? err.message : JSON.stringify(err); logManager.error(`googlePay - completePushProvisionError - ${errMsg}`); - if (e instanceof Error) { - if (['CANCELED'].includes(e.message)) { + if (err instanceof Error) { + if (['CANCELED'].includes(err.message)) { return; } } diff --git a/tsconfig.json b/tsconfig.json index 0a200828b3..57a2636a88 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -47,6 +47,7 @@ // "types": [], /* Type declaration files to be included in compilation. */ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "resolveJsonModule": true, // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ "skipLibCheck": false /* Skip type checking of declaration files. */