diff --git a/.prettierignore b/.prettierignore index 66a6fa8912..3823812edd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -103,7 +103,7 @@ buck-out/ !**/suite-native/app/.env.staging suite-native/atoms/src/Spinner/refresh-spinner-*.json -suite-native/device/src/assets/confirm-on-trezor-lottie.json +suite-native/confirm-on-trezor/src/assets/confirm-on-trezor-lottie.json suite-native/module-home/src/assets/auto-eject-*-lottie.json suite-native/transaction-management/assets/send-arrows-lottie.json suite-native/thp/src/assets/create-secure-connection-lottie.json diff --git a/suite-native/confirm-on-trezor/package.json b/suite-native/confirm-on-trezor/package.json new file mode 100644 index 0000000000..46cdce77c7 --- /dev/null +++ b/suite-native/confirm-on-trezor/package.json @@ -0,0 +1,31 @@ +{ + "name": "@suite-native/confirm-on-trezor", + "version": "1.0.0", + "private": true, + "license": "See LICENSE.md in repo root", + "sideEffects": false, + "main": "src/index", + "scripts": { + "depcheck": "yarn g:depcheck", + "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'", + "lint:js:fix": "yarn lint:js --fix", + "type-check": "yarn g:tsc --build" + }, + "dependencies": { + "@react-navigation/native": "7.1.26", + "@suite-native/atoms": "workspace:*", + "@suite-native/config": "workspace:*", + "@suite-native/intl": "workspace:*", + "@suite-native/navigation": "workspace:*", + "@suite-native/theme": "workspace:*", + "@trezor/env-utils": "workspace:*", + "@trezor/styles": "workspace:*", + "@trezor/theme": "workspace:*", + "expo-haptics": "~15.0.8", + "expo-linear-gradient": "~15.0.8", + "react": "19.1.0", + "react-native": "0.81.5", + "react-native-gesture-handler": "2.29.0", + "react-native-reanimated": "~4.1.5" + } +} diff --git a/suite-native/device/src/assets/confirm-on-trezor-lottie.json b/suite-native/confirm-on-trezor/src/assets/confirm-on-trezor-lottie.json similarity index 100% rename from suite-native/device/src/assets/confirm-on-trezor-lottie.json rename to suite-native/confirm-on-trezor/src/assets/confirm-on-trezor-lottie.json diff --git a/suite-native/device/src/assets/confirmOnTrezor.webp b/suite-native/confirm-on-trezor/src/assets/confirmOnTrezor.webp similarity index 100% rename from suite-native/device/src/assets/confirmOnTrezor.webp rename to suite-native/confirm-on-trezor/src/assets/confirmOnTrezor.webp diff --git a/suite-native/device/src/assets/confirmOnTrezor@2x.webp b/suite-native/confirm-on-trezor/src/assets/confirmOnTrezor@2x.webp similarity index 100% rename from suite-native/device/src/assets/confirmOnTrezor@2x.webp rename to suite-native/confirm-on-trezor/src/assets/confirmOnTrezor@2x.webp diff --git a/suite-native/device/src/assets/confirmOnTrezor@3x.webp b/suite-native/confirm-on-trezor/src/assets/confirmOnTrezor@3x.webp similarity index 100% rename from suite-native/device/src/assets/confirmOnTrezor@3x.webp rename to suite-native/confirm-on-trezor/src/assets/confirmOnTrezor@3x.webp diff --git a/suite-native/device/src/components/ConfirmOnTrezorAnimation.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorAnimation.tsx similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezorAnimation.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorAnimation.tsx diff --git a/suite-native/device/src/components/ConfirmOnTrezorBottomSheet.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorBottomSheet.tsx similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezorBottomSheet.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorBottomSheet.tsx diff --git a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorContent.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorContent.tsx similarity index 98% rename from suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorContent.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorContent.tsx index f33adb4197..a5f53016d6 100644 --- a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorContent.tsx +++ b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorContent.tsx @@ -18,7 +18,7 @@ import { getScreenWidth, getWindowWidth } from '@trezor/env-utils'; import { prepareNativeStyle, useNativeStyles } from '@trezor/styles'; import { ThemeColorVariant } from '@trezor/theme'; -import { BottomSheetControlProps } from './hooks/useConfirmOnTrezorSheet'; +import { BottomSheetControlProps } from '../hooks/useConfirmOnTrezorSheet'; const SCREEN_WIDTH = getScreenWidth(); const WINDOW_WIDTH = getWindowWidth(); diff --git a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorHeader.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorHeader.tsx similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorHeader.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorHeader.tsx diff --git a/suite-native/device/src/components/ConfirmOnTrezorImage.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorImage.tsx similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezorImage.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorImage.tsx diff --git a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorIndicator.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorIndicator.tsx similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorIndicator.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorIndicator.tsx diff --git a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorInstructions.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorInstructions.tsx similarity index 92% rename from suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorInstructions.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorInstructions.tsx index f86a809d24..e4370cc263 100644 --- a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorInstructions.tsx +++ b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorInstructions.tsx @@ -2,7 +2,7 @@ import { Box, Text, VStack } from '@suite-native/atoms'; import { Translation } from '@suite-native/intl'; import { prepareNativeStyle, useNativeStyles } from '@trezor/styles'; -import { ConfirmOnTrezorAnimation } from '../ConfirmOnTrezorAnimation'; +import { ConfirmOnTrezorAnimation } from './ConfirmOnTrezorAnimation'; const containerStyle = prepareNativeStyle(() => ({ marginTop: '25%', diff --git a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorWrapper.tsx b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorWrapper.tsx similarity index 97% rename from suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorWrapper.tsx rename to suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorWrapper.tsx index 983ade7d26..b3c619c5fd 100644 --- a/suite-native/device/src/components/ConfirmOnTrezor/ConfirmOnTrezorWrapper.tsx +++ b/suite-native/confirm-on-trezor/src/components/ConfirmOnTrezorWrapper.tsx @@ -15,7 +15,7 @@ import { prepareNativeTheme } from '@trezor/theme'; import { ConfirmOnTrezorContent, type ConfirmOnTrezorWrapperProps } from './ConfirmOnTrezorContent'; import { ConfirmOnTrezorHeader } from './ConfirmOnTrezorHeader'; import { ConfirmOnTrezorInstructions } from './ConfirmOnTrezorInstructions'; -import { useConfirmOnTrezorSheet } from './hooks/useConfirmOnTrezorSheet'; +import { useConfirmOnTrezorSheet } from '../hooks/useConfirmOnTrezorSheet'; const instructionsContainerStyle = prepareNativeStyle<{ paddingTop: number; diff --git a/suite-native/device/src/components/ConfirmOnTrezor/hooks/useConfirmOnTrezorController.ts b/suite-native/confirm-on-trezor/src/hooks/useConfirmOnTrezorController.ts similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezor/hooks/useConfirmOnTrezorController.ts rename to suite-native/confirm-on-trezor/src/hooks/useConfirmOnTrezorController.ts diff --git a/suite-native/device/src/components/ConfirmOnTrezor/hooks/useConfirmOnTrezorSheet.ts b/suite-native/confirm-on-trezor/src/hooks/useConfirmOnTrezorSheet.ts similarity index 100% rename from suite-native/device/src/components/ConfirmOnTrezor/hooks/useConfirmOnTrezorSheet.ts rename to suite-native/confirm-on-trezor/src/hooks/useConfirmOnTrezorSheet.ts diff --git a/suite-native/confirm-on-trezor/src/index.ts b/suite-native/confirm-on-trezor/src/index.ts new file mode 100644 index 0000000000..9f7cb0335e --- /dev/null +++ b/suite-native/confirm-on-trezor/src/index.ts @@ -0,0 +1,5 @@ +export * from './components/ConfirmOnTrezorAnimation'; +export * from './components/ConfirmOnTrezorImage'; +export * from './components/ConfirmOnTrezorWrapper'; +export * from './hooks/useConfirmOnTrezorController'; +export * from './hooks/useConfirmOnTrezorSheet'; diff --git a/suite-native/confirm-on-trezor/tsconfig.json b/suite-native/confirm-on-trezor/tsconfig.json new file mode 100644 index 0000000000..edb0cdc398 --- /dev/null +++ b/suite-native/confirm-on-trezor/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { "outDir": "libDev" }, + "references": [ + { "path": "../atoms" }, + { "path": "../config" }, + { "path": "../intl" }, + { "path": "../navigation" }, + { "path": "../theme" }, + { "path": "../../packages/env-utils" }, + { "path": "../../packages/styles" }, + { "path": "../../packages/theme" } + ], + "include": [".", "**/*.json"] +} diff --git a/suite-native/device/package.json b/suite-native/device/package.json index 01a1bac2b0..cb92e3d0ca 100644 --- a/suite-native/device/package.json +++ b/suite-native/device/package.json @@ -31,7 +31,6 @@ "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", "@suite-native/bluetooth": "workspace:*", - "@suite-native/config": "workspace:*", "@suite-native/device-mutex": "workspace:*", "@suite-native/device-onboarding": "workspace:*", "@suite-native/feature-flags": "workspace:*", @@ -58,8 +57,6 @@ "@trezor/utils": "workspace:*", "@types/semver": "^7.7.0", "expo": "~54.0.30", - "expo-haptics": "~15.0.8", - "expo-linear-gradient": "~15.0.8", "expo-video": "~3.0.15", "jotai": "2.15.0", "react": "19.1.0", diff --git a/suite-native/device/src/components/ConfirmOnTrezor/index.ts b/suite-native/device/src/components/ConfirmOnTrezor/index.ts deleted file mode 100644 index 2badec5102..0000000000 --- a/suite-native/device/src/components/ConfirmOnTrezor/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './ConfirmOnTrezorWrapper'; -export * from './hooks/useConfirmOnTrezorSheet'; -export * from './hooks/useConfirmOnTrezorController'; diff --git a/suite-native/device/src/index.ts b/suite-native/device/src/index.ts index cd8c0887eb..59c7e752de 100644 --- a/suite-native/device/src/index.ts +++ b/suite-native/device/src/index.ts @@ -10,7 +10,6 @@ export * from './hooks/usePinAction'; export * from './hooks/useRenderDeviceDangerBanner'; export * from './hooks/useCoinLabel'; export * from './components/ConnectDeviceAnimation'; -export * from './components/ConfirmOnTrezorImage'; export * from './components/ConnectorImage'; export * from './components/DeviceImage'; export * from './components/ContinueOnTrezorScreenContent'; @@ -23,8 +22,6 @@ export * from './deviceThunks'; export * from './types'; export * from './deviceAtoms'; export * from './components/EmptyWalletSvg'; -export * from './components/ConfirmOnTrezorAnimation'; export * from './components/TrezorDeviceSvg'; -export * from './components/ConfirmOnTrezor'; export * from './components/DeviceInteractionScreenWrapper'; export * from './hooks/useDeviceLowBatteryAlert'; diff --git a/suite-native/device/tsconfig.json b/suite-native/device/tsconfig.json index 5a6c38eaf5..4afe470e94 100644 --- a/suite-native/device/tsconfig.json +++ b/suite-native/device/tsconfig.json @@ -43,7 +43,6 @@ { "path": "../analytics" }, { "path": "../atoms" }, { "path": "../bluetooth" }, - { "path": "../config" }, { "path": "../device-mutex" }, { "path": "../device-onboarding" }, { "path": "../feature-flags" }, diff --git a/suite-native/firmware/package.json b/suite-native/firmware/package.json index 93a9439634..21ad741a06 100644 --- a/suite-native/firmware/package.json +++ b/suite-native/firmware/package.json @@ -15,15 +15,16 @@ "@reduxjs/toolkit": "2.11.2", "@shopify/react-native-skia": "2.2.12", "@suite-common/firmware": "workspace:*", - "@suite-common/redux-utils": "workspace:*", "@suite-common/icons": "workspace:*", "@suite-common/message-system": "workspace:*", + "@suite-common/redux-utils": "workspace:*", "@suite-common/suite-types": "workspace:*", "@suite-common/wallet-core": "workspace:*", "@suite-native/alerts": "workspace:*", "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", "@suite-native/config": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/device-mutex": "workspace:*", "@suite-native/icons": "workspace:*", "@suite-native/intl": "workspace:*", diff --git a/suite-native/firmware/src/components/FirmwareInstallationScreenContent.tsx b/suite-native/firmware/src/components/FirmwareInstallationScreenContent.tsx index 7174e3979e..67fb923840 100644 --- a/suite-native/firmware/src/components/FirmwareInstallationScreenContent.tsx +++ b/suite-native/firmware/src/components/FirmwareInstallationScreenContent.tsx @@ -7,7 +7,10 @@ import { useKeepAwake } from 'expo-keep-awake'; import { firmwareActions } from '@suite-common/firmware'; import { Box, Button, VStack, useBottomSheetModal } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper, useConfirmOnTrezorController } from '@suite-native/device'; +import { + ConfirmOnTrezorWrapper, + useConfirmOnTrezorController, +} from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { SUITE_MOBILE_SUPPORT_URL, useOpenLink } from '@suite-native/link'; import { DynamicScreenHeader } from '@suite-native/navigation'; diff --git a/suite-native/firmware/tsconfig.json b/suite-native/firmware/tsconfig.json index fb80d2ebc3..47d2d40e49 100644 --- a/suite-native/firmware/tsconfig.json +++ b/suite-native/firmware/tsconfig.json @@ -7,6 +7,9 @@ { "path": "../../suite-common/message-system" }, + { + "path": "../../suite-common/redux-utils" + }, { "path": "../../suite-common/suite-types" }, @@ -17,6 +20,7 @@ { "path": "../analytics" }, { "path": "../atoms" }, { "path": "../config" }, + { "path": "../confirm-on-trezor" }, { "path": "../device-mutex" }, { "path": "../icons" }, { "path": "../intl" }, diff --git a/suite-native/module-connect-popup/package.json b/suite-native/module-connect-popup/package.json index 8e17fa8484..542d6625b6 100644 --- a/suite-native/module-connect-popup/package.json +++ b/suite-native/module-connect-popup/package.json @@ -25,7 +25,7 @@ "@suite-native/atoms": "workspace:*", "@suite-native/clipboard": "workspace:*", "@suite-native/config": "workspace:*", - "@suite-native/device": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/device-manager": "workspace:*", "@suite-native/icons": "workspace:^", "@suite-native/intl": "workspace:^", diff --git a/suite-native/module-connect-popup/src/components/ButtonRequestsOverlay.tsx b/suite-native/module-connect-popup/src/components/ButtonRequestsOverlay.tsx index d22c26d6d5..2b2e6e1053 100644 --- a/suite-native/module-connect-popup/src/components/ButtonRequestsOverlay.tsx +++ b/suite-native/module-connect-popup/src/components/ButtonRequestsOverlay.tsx @@ -2,7 +2,7 @@ import { useSelector } from 'react-redux'; import { selectSelectedDevice } from '@suite-common/wallet-core'; import { Box } from '@suite-native/atoms'; -import { ConfirmOnTrezorImage } from '@suite-native/device'; +import { ConfirmOnTrezorImage } from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { prepareNativeStyle, useNativeStyles } from '@trezor/styles'; diff --git a/suite-native/module-connect-popup/tsconfig.json b/suite-native/module-connect-popup/tsconfig.json index bc1cd0f5d7..aa16abcf2f 100644 --- a/suite-native/module-connect-popup/tsconfig.json +++ b/suite-native/module-connect-popup/tsconfig.json @@ -33,7 +33,7 @@ { "path": "../atoms" }, { "path": "../clipboard" }, { "path": "../config" }, - { "path": "../device" }, + { "path": "../confirm-on-trezor" }, { "path": "../device-manager" }, { "path": "../icons" }, { "path": "../intl" }, diff --git a/suite-native/module-home/package.json b/suite-native/module-home/package.json index 3cda405625..5dfe1e17e7 100644 --- a/suite-native/module-home/package.json +++ b/suite-native/module-home/package.json @@ -28,6 +28,7 @@ "@suite-native/atoms": "workspace:*", "@suite-native/blockchain": "workspace:*", "@suite-native/bluetooth": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/device": "workspace:*", "@suite-native/device-manager": "workspace:*", "@suite-native/discovery": "workspace:*", diff --git a/suite-native/module-home/src/screens/HomeScreen/components/UninitializedConnectedDeviceState.tsx b/suite-native/module-home/src/screens/HomeScreen/components/UninitializedConnectedDeviceState.tsx index 68de02a588..d9fff79c25 100644 --- a/suite-native/module-home/src/screens/HomeScreen/components/UninitializedConnectedDeviceState.tsx +++ b/suite-native/module-home/src/screens/HomeScreen/components/UninitializedConnectedDeviceState.tsx @@ -4,7 +4,7 @@ import { useNavigation } from '@react-navigation/native'; import { selectDeviceModel } from '@suite-common/wallet-core'; import { Box, Button, Card, CenteredTitleHeader, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorAnimation } from '@suite-native/device'; +import { ConfirmOnTrezorAnimation } from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { DeviceOnboardingStackRoutes, diff --git a/suite-native/module-home/tsconfig.json b/suite-native/module-home/tsconfig.json index 8a83a7b8de..fbee37534b 100644 --- a/suite-native/module-home/tsconfig.json +++ b/suite-native/module-home/tsconfig.json @@ -28,6 +28,7 @@ { "path": "../atoms" }, { "path": "../blockchain" }, { "path": "../bluetooth" }, + { "path": "../confirm-on-trezor" }, { "path": "../device" }, { "path": "../device-manager" }, { "path": "../discovery" }, diff --git a/suite-native/module-send/package.json b/suite-native/module-send/package.json index 8ad53bdbdc..0215adad60 100644 --- a/suite-native/module-send/package.json +++ b/suite-native/module-send/package.json @@ -30,7 +30,7 @@ "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", "@suite-native/config": "workspace:*", - "@suite-native/device": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/formatters": "workspace:*", "@suite-native/forms": "workspace:*", "@suite-native/helpers": "workspace:*", diff --git a/suite-native/module-send/src/screens/SendAddressReviewScreen.tsx b/suite-native/module-send/src/screens/SendAddressReviewScreen.tsx index 5d32f15cc5..f4b0ba2259 100644 --- a/suite-native/module-send/src/screens/SendAddressReviewScreen.tsx +++ b/suite-native/module-send/src/screens/SendAddressReviewScreen.tsx @@ -4,7 +4,10 @@ import { useSelector } from 'react-redux'; import { useFocusEffect } from '@react-navigation/native'; import { Box, Text, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper, useConfirmOnTrezorController } from '@suite-native/device'; +import { + ConfirmOnTrezorWrapper, + useConfirmOnTrezorController, +} from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { ScreenHeader, diff --git a/suite-native/module-send/src/screens/SendDestinationTagReviewScreen.tsx b/suite-native/module-send/src/screens/SendDestinationTagReviewScreen.tsx index 2ee900d352..7011b8bbfb 100644 --- a/suite-native/module-send/src/screens/SendDestinationTagReviewScreen.tsx +++ b/suite-native/module-send/src/screens/SendDestinationTagReviewScreen.tsx @@ -4,7 +4,10 @@ import { useSelector } from 'react-redux'; import { useFocusEffect } from '@react-navigation/native'; import { Text, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper, useConfirmOnTrezorController } from '@suite-native/device'; +import { + ConfirmOnTrezorWrapper, + useConfirmOnTrezorController, +} from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { SendStackParamList, SendStackRoutes, StackProps } from '@suite-native/navigation'; import { diff --git a/suite-native/module-send/src/screens/SendOutputsReviewScreen.tsx b/suite-native/module-send/src/screens/SendOutputsReviewScreen.tsx index 064890c5aa..632dcadaef 100644 --- a/suite-native/module-send/src/screens/SendOutputsReviewScreen.tsx +++ b/suite-native/module-send/src/screens/SendOutputsReviewScreen.tsx @@ -3,7 +3,10 @@ import { useSelector } from 'react-redux'; import { AccountsRootState, selectAccountByKey } from '@suite-common/wallet-core'; import { Box, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper, useConfirmOnTrezorController } from '@suite-native/device'; +import { + ConfirmOnTrezorWrapper, + useConfirmOnTrezorController, +} from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { ScreenHeader, diff --git a/suite-native/module-send/tsconfig.json b/suite-native/module-send/tsconfig.json index 5819048d5b..252161b974 100644 --- a/suite-native/module-send/tsconfig.json +++ b/suite-native/module-send/tsconfig.json @@ -31,7 +31,7 @@ { "path": "../analytics" }, { "path": "../atoms" }, { "path": "../config" }, - { "path": "../device" }, + { "path": "../confirm-on-trezor" }, { "path": "../formatters" }, { "path": "../forms" }, { "path": "../helpers" }, diff --git a/suite-native/module-stellar-token-management/package.json b/suite-native/module-stellar-token-management/package.json index e1976d1722..52d88bbb53 100644 --- a/suite-native/module-stellar-token-management/package.json +++ b/suite-native/module-stellar-token-management/package.json @@ -23,7 +23,7 @@ "@suite-common/wallet-utils": "workspace:*", "@suite-native/alerts": "workspace:*", "@suite-native/atoms": "workspace:*", - "@suite-native/device": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/forms": "workspace:*", "@suite-native/icons": "workspace:*", "@suite-native/intl": "workspace:*", diff --git a/suite-native/module-stellar-token-management/src/hooks/__tests__/useStellarFeeScreen.test.ts b/suite-native/module-stellar-token-management/src/hooks/__tests__/useStellarFeeScreen.test.ts index d82857ec0e..38327f1347 100644 --- a/suite-native/module-stellar-token-management/src/hooks/__tests__/useStellarFeeScreen.test.ts +++ b/suite-native/module-stellar-token-management/src/hooks/__tests__/useStellarFeeScreen.test.ts @@ -68,8 +68,8 @@ jest.mock('@react-navigation/native', () => ({ }, })); -jest.mock('@suite-native/device', () => ({ - ...jest.requireActual('@suite-native/device'), +jest.mock('@suite-native/confirm-on-trezor', () => ({ + ...jest.requireActual('@suite-native/confirm-on-trezor'), useConfirmOnTrezorController: () => ({ revealConfirmOnTrezorSheet: mockRevealConfirmOnTrezorSheet, confirmOnTrezorRef: { current: null }, diff --git a/suite-native/module-stellar-token-management/src/hooks/useStellarFeeScreen.ts b/suite-native/module-stellar-token-management/src/hooks/useStellarFeeScreen.ts index 65ff181c83..ecd7990984 100644 --- a/suite-native/module-stellar-token-management/src/hooks/useStellarFeeScreen.ts +++ b/suite-native/module-stellar-token-management/src/hooks/useStellarFeeScreen.ts @@ -25,7 +25,7 @@ import { } from '@suite-common/wallet-types'; import { useAlert } from '@suite-native/alerts'; import { useBottomSheetModal } from '@suite-native/atoms'; -import { useConfirmOnTrezorController } from '@suite-native/device'; +import { useConfirmOnTrezorController } from '@suite-native/confirm-on-trezor'; import { useTranslate } from '@suite-native/intl'; import { AuthorizeDeviceStackRoutes, diff --git a/suite-native/module-stellar-token-management/src/screens/ActivationFeeScreen.tsx b/suite-native/module-stellar-token-management/src/screens/ActivationFeeScreen.tsx index e31bc918c0..8dd876140a 100644 --- a/suite-native/module-stellar-token-management/src/screens/ActivationFeeScreen.tsx +++ b/suite-native/module-stellar-token-management/src/screens/ActivationFeeScreen.tsx @@ -6,7 +6,7 @@ import { useNavigation, useRoute } from '@react-navigation/native'; import { activateStellarTokenThunk } from '@suite-common/wallet-core'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { Box, Button, InlineAlertBox, Text, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper } from '@suite-native/device'; +import { ConfirmOnTrezorWrapper } from '@suite-native/confirm-on-trezor'; import { Form } from '@suite-native/forms'; import { Translation } from '@suite-native/intl'; import { Link } from '@suite-native/link'; diff --git a/suite-native/module-stellar-token-management/src/screens/DeactivationFeeScreen.tsx b/suite-native/module-stellar-token-management/src/screens/DeactivationFeeScreen.tsx index dcb52ce577..01c7b164fc 100644 --- a/suite-native/module-stellar-token-management/src/screens/DeactivationFeeScreen.tsx +++ b/suite-native/module-stellar-token-management/src/screens/DeactivationFeeScreen.tsx @@ -6,7 +6,7 @@ import { useNavigation, useRoute } from '@react-navigation/native'; import { deactivateStellarTokenThunk } from '@suite-common/wallet-core'; import { formatNetworkAmount } from '@suite-common/wallet-utils'; import { Box, Button, Card, HStack, Text, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper } from '@suite-native/device'; +import { ConfirmOnTrezorWrapper } from '@suite-native/confirm-on-trezor'; import { Form } from '@suite-native/forms'; import { Icon } from '@suite-native/icons'; import { Translation } from '@suite-native/intl'; diff --git a/suite-native/module-stellar-token-management/tsconfig.json b/suite-native/module-stellar-token-management/tsconfig.json index c8dc7f3df3..6396fcd62d 100644 --- a/suite-native/module-stellar-token-management/tsconfig.json +++ b/suite-native/module-stellar-token-management/tsconfig.json @@ -22,7 +22,7 @@ }, { "path": "../alerts" }, { "path": "../atoms" }, - { "path": "../device" }, + { "path": "../confirm-on-trezor" }, { "path": "../forms" }, { "path": "../icons" }, { "path": "../intl" }, diff --git a/suite-native/module-trading/package.json b/suite-native/module-trading/package.json index 3c3081d954..6220530f9f 100644 --- a/suite-native/module-trading/package.json +++ b/suite-native/module-trading/package.json @@ -39,6 +39,7 @@ "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", "@suite-native/clipboard": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/device": "workspace:*", "@suite-native/device-authorization": "workspace:*", "@suite-native/device-manager": "workspace:*", diff --git a/suite-native/module-trading/src/components/reviewOutputs/ReviewOutputsContent.tsx b/suite-native/module-trading/src/components/reviewOutputs/ReviewOutputsContent.tsx index 14bb9df253..089406254e 100644 --- a/suite-native/module-trading/src/components/reviewOutputs/ReviewOutputsContent.tsx +++ b/suite-native/module-trading/src/components/reviewOutputs/ReviewOutputsContent.tsx @@ -1,7 +1,7 @@ import { TradingType } from '@suite-common/trading'; import { AccountKey, TokenAddress } from '@suite-common/wallet-types'; import { Box, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorWrapper } from '@suite-native/device'; +import { ConfirmOnTrezorWrapper } from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { ScreenHeader } from '@suite-native/navigation'; import { ReviewOutputItemList } from '@suite-native/transaction-management'; diff --git a/suite-native/module-trading/src/components/reviewOutputs/__tests__/ReviewOutputsContent.comp.test.tsx b/suite-native/module-trading/src/components/reviewOutputs/__tests__/ReviewOutputsContent.comp.test.tsx index b757f92fe6..896917f29f 100644 --- a/suite-native/module-trading/src/components/reviewOutputs/__tests__/ReviewOutputsContent.comp.test.tsx +++ b/suite-native/module-trading/src/components/reviewOutputs/__tests__/ReviewOutputsContent.comp.test.tsx @@ -3,8 +3,8 @@ import { renderWithStoreProviderAsync } from '@suite-native/test-utils'; import { ReviewOutputsContent, ReviewOutputsContentProps } from '../ReviewOutputsContent'; -jest.mock('@suite-native/device', () => ({ - ...jest.requireActual('@suite-native/device'), +jest.mock('@suite-native/confirm-on-trezor', () => ({ + ...jest.requireActual('@suite-native/confirm-on-trezor'), useConfirmOnTrezorController: () => ({ confirmOnTrezorRef: { current: null }, closeSheet: jest.fn(), diff --git a/suite-native/module-trading/src/hooks/reviewOutputs/__tests__/useTradingOutputsReviewScreenControls.hook.test.ts b/suite-native/module-trading/src/hooks/reviewOutputs/__tests__/useTradingOutputsReviewScreenControls.hook.test.ts index 6953e048af..fbeb602554 100644 --- a/suite-native/module-trading/src/hooks/reviewOutputs/__tests__/useTradingOutputsReviewScreenControls.hook.test.ts +++ b/suite-native/module-trading/src/hooks/reviewOutputs/__tests__/useTradingOutputsReviewScreenControls.hook.test.ts @@ -26,8 +26,8 @@ const mockPop = jest.fn(); const mockUseOutputsReviewBackInterceptor = jest.fn(); const mockShowAlert = jest.fn(); -jest.mock('@suite-native/device', () => ({ - ...jest.requireActual('@suite-native/device'), +jest.mock('@suite-native/confirm-on-trezor', () => ({ + ...jest.requireActual('@suite-native/confirm-on-trezor'), useConfirmOnTrezorController: () => mockUseConfirmOnTrezorController, })); diff --git a/suite-native/module-trading/src/hooks/reviewOutputs/useTradingOutputsReviewScreenControls.ts b/suite-native/module-trading/src/hooks/reviewOutputs/useTradingOutputsReviewScreenControls.ts index 33a2519884..b8fe77e2fe 100644 --- a/suite-native/module-trading/src/hooks/reviewOutputs/useTradingOutputsReviewScreenControls.ts +++ b/suite-native/module-trading/src/hooks/reviewOutputs/useTradingOutputsReviewScreenControls.ts @@ -5,7 +5,7 @@ import { useNavigation } from '@react-navigation/native'; import { sendFormActions } from '@suite-common/wallet-core'; import { AccountKey } from '@suite-common/wallet-types'; -import { useConfirmOnTrezorController } from '@suite-native/device'; +import { useConfirmOnTrezorController } from '@suite-native/confirm-on-trezor'; import type { TradingExchangeAnalyticReportCallback, TradingSellAnalyticReportCallback, diff --git a/suite-native/module-trading/src/screens/__tests__/TradingOutputsReviewScreen.comp.test.tsx b/suite-native/module-trading/src/screens/__tests__/TradingOutputsReviewScreen.comp.test.tsx index 571bc6a9ad..cf85cee9d5 100644 --- a/suite-native/module-trading/src/screens/__tests__/TradingOutputsReviewScreen.comp.test.tsx +++ b/suite-native/module-trading/src/screens/__tests__/TradingOutputsReviewScreen.comp.test.tsx @@ -50,8 +50,8 @@ jest.mock('@react-navigation/native', () => ({ useRoute: () => ({ name: 'TEST_ROUTE_NAME' }), })); -jest.mock('@suite-native/device', () => ({ - ...jest.requireActual('@suite-native/device'), +jest.mock('@suite-native/confirm-on-trezor', () => ({ + ...jest.requireActual('@suite-native/confirm-on-trezor'), useConfirmOnTrezorController: () => ({ confirmOnTrezorRef: { current: null }, closeSheet: jest.fn(), diff --git a/suite-native/module-trading/tsconfig.json b/suite-native/module-trading/tsconfig.json index ac3be4f877..620ec2ca1d 100644 --- a/suite-native/module-trading/tsconfig.json +++ b/suite-native/module-trading/tsconfig.json @@ -45,6 +45,7 @@ { "path": "../analytics" }, { "path": "../atoms" }, { "path": "../clipboard" }, + { "path": "../confirm-on-trezor" }, { "path": "../device" }, { "path": "../device-authorization" }, { "path": "../device-manager" }, diff --git a/suite-native/passphrase/package.json b/suite-native/passphrase/package.json index 94655671e4..bb4581533e 100644 --- a/suite-native/passphrase/package.json +++ b/suite-native/passphrase/package.json @@ -19,7 +19,7 @@ "@suite-native/alerts": "workspace:*", "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", - "@suite-native/device": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/forms": "workspace:*", "@suite-native/icons": "workspace:*", "@suite-native/intl": "workspace:*", diff --git a/suite-native/passphrase/src/components/PassphraseConfirmOnTrezorScreenContent.tsx b/suite-native/passphrase/src/components/PassphraseConfirmOnTrezorScreenContent.tsx index aa9bf8fa67..3a354bef5c 100644 --- a/suite-native/passphrase/src/components/PassphraseConfirmOnTrezorScreenContent.tsx +++ b/suite-native/passphrase/src/components/PassphraseConfirmOnTrezorScreenContent.tsx @@ -1,5 +1,5 @@ import { CenteredTitleHeader, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorAnimation } from '@suite-native/device'; +import { ConfirmOnTrezorAnimation } from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; export const PassphraseConfirmOnTrezorScreenContent = () => ( diff --git a/suite-native/passphrase/src/components/PassphraseEnterOnTrezorScreenContent.tsx b/suite-native/passphrase/src/components/PassphraseEnterOnTrezorScreenContent.tsx index 568855fe63..3f0b5c0202 100644 --- a/suite-native/passphrase/src/components/PassphraseEnterOnTrezorScreenContent.tsx +++ b/suite-native/passphrase/src/components/PassphraseEnterOnTrezorScreenContent.tsx @@ -1,5 +1,5 @@ import { Box, Button, Card, CenteredTitleHeader, VStack } from '@suite-native/atoms'; -import { ConfirmOnTrezorAnimation } from '@suite-native/device'; +import { ConfirmOnTrezorAnimation } from '@suite-native/confirm-on-trezor'; import { Translation } from '@suite-native/intl'; import { prepareNativeStyle, useNativeStyles } from '@trezor/styles'; diff --git a/suite-native/passphrase/tsconfig.json b/suite-native/passphrase/tsconfig.json index e45a82603a..3c4fcfeb9c 100644 --- a/suite-native/passphrase/tsconfig.json +++ b/suite-native/passphrase/tsconfig.json @@ -11,7 +11,7 @@ { "path": "../alerts" }, { "path": "../analytics" }, { "path": "../atoms" }, - { "path": "../device" }, + { "path": "../confirm-on-trezor" }, { "path": "../forms" }, { "path": "../icons" }, { "path": "../intl" }, diff --git a/suite-native/receive/package.json b/suite-native/receive/package.json index 1fb1b170b8..0c83bdc089 100644 --- a/suite-native/receive/package.json +++ b/suite-native/receive/package.json @@ -24,6 +24,7 @@ "@suite-native/analytics": "workspace:*", "@suite-native/atoms": "workspace:*", "@suite-native/clipboard": "workspace:*", + "@suite-native/confirm-on-trezor": "workspace:*", "@suite-native/device": "workspace:*", "@suite-native/device-mutex": "workspace:*", "@suite-native/helpers": "workspace:*", diff --git a/suite-native/receive/src/screens/ReceiveAddressScreen.tsx b/suite-native/receive/src/screens/ReceiveAddressScreen.tsx index 9c797cdf38..9aa6687369 100644 --- a/suite-native/receive/src/screens/ReceiveAddressScreen.tsx +++ b/suite-native/receive/src/screens/ReceiveAddressScreen.tsx @@ -22,9 +22,9 @@ import { } from '@suite-native/atoms'; import { ConfirmOnTrezorWrapper, - selectHasFirmwareAuthenticityCheckHardFailed, useConfirmOnTrezorController, -} from '@suite-native/device'; +} from '@suite-native/confirm-on-trezor'; +import { selectHasFirmwareAuthenticityCheckHardFailed } from '@suite-native/device'; import { useInAppRating } from '@suite-native/in-app-rating'; import { Translation } from '@suite-native/intl'; import { Link } from '@suite-native/link'; diff --git a/suite-native/receive/tsconfig.json b/suite-native/receive/tsconfig.json index dfc0341202..dfa6ffd273 100644 --- a/suite-native/receive/tsconfig.json +++ b/suite-native/receive/tsconfig.json @@ -19,6 +19,7 @@ { "path": "../analytics" }, { "path": "../atoms" }, { "path": "../clipboard" }, + { "path": "../confirm-on-trezor" }, { "path": "../device" }, { "path": "../device-mutex" }, { "path": "../helpers" }, diff --git a/yarn.lock b/yarn.lock index 1675c8dc5c..5865e9fcb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12262,6 +12262,28 @@ __metadata: languageName: unknown linkType: soft +"@suite-native/confirm-on-trezor@workspace:*, @suite-native/confirm-on-trezor@workspace:suite-native/confirm-on-trezor": + version: 0.0.0-use.local + resolution: "@suite-native/confirm-on-trezor@workspace:suite-native/confirm-on-trezor" + dependencies: + "@react-navigation/native": "npm:7.1.26" + "@suite-native/atoms": "workspace:*" + "@suite-native/config": "workspace:*" + "@suite-native/intl": "workspace:*" + "@suite-native/navigation": "workspace:*" + "@suite-native/theme": "workspace:*" + "@trezor/env-utils": "workspace:*" + "@trezor/styles": "workspace:*" + "@trezor/theme": "workspace:*" + expo-haptics: "npm:~15.0.8" + expo-linear-gradient: "npm:~15.0.8" + react: "npm:19.1.0" + react-native: "npm:0.81.5" + react-native-gesture-handler: "npm:2.29.0" + react-native-reanimated: "npm:~4.1.5" + languageName: unknown + linkType: soft + "@suite-native/connection-status@workspace:*, @suite-native/connection-status@workspace:suite-native/connection-status": version: 0.0.0-use.local resolution: "@suite-native/connection-status@workspace:suite-native/connection-status" @@ -12402,7 +12424,6 @@ __metadata: "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" "@suite-native/bluetooth": "workspace:*" - "@suite-native/config": "workspace:*" "@suite-native/device-mutex": "workspace:*" "@suite-native/device-onboarding": "workspace:*" "@suite-native/feature-flags": "workspace:*" @@ -12429,8 +12450,6 @@ __metadata: "@trezor/utils": "workspace:*" "@types/semver": "npm:^7.7.0" expo: "npm:~54.0.30" - expo-haptics: "npm:~15.0.8" - expo-linear-gradient: "npm:~15.0.8" expo-video: "npm:~3.0.15" jotai: "npm:2.15.0" react: "npm:19.1.0" @@ -12516,12 +12535,14 @@ __metadata: "@suite-common/firmware": "workspace:*" "@suite-common/icons": "workspace:*" "@suite-common/message-system": "workspace:*" + "@suite-common/redux-utils": "workspace:*" "@suite-common/suite-types": "workspace:*" "@suite-common/wallet-core": "workspace:*" "@suite-native/alerts": "workspace:*" "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" "@suite-native/config": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/device-mutex": "workspace:*" "@suite-native/icons": "workspace:*" "@suite-native/intl": "workspace:*" @@ -13032,7 +13053,7 @@ __metadata: "@suite-native/atoms": "workspace:*" "@suite-native/clipboard": "workspace:*" "@suite-native/config": "workspace:*" - "@suite-native/device": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/device-manager": "workspace:*" "@suite-native/icons": "workspace:^" "@suite-native/intl": "workspace:^" @@ -13268,6 +13289,7 @@ __metadata: "@suite-native/atoms": "workspace:*" "@suite-native/blockchain": "workspace:*" "@suite-native/bluetooth": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/device": "workspace:*" "@suite-native/device-manager": "workspace:*" "@suite-native/discovery": "workspace:*" @@ -13378,7 +13400,7 @@ __metadata: "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" "@suite-native/config": "workspace:*" - "@suite-native/device": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/formatters": "workspace:*" "@suite-native/forms": "workspace:*" "@suite-native/helpers": "workspace:*" @@ -13489,7 +13511,7 @@ __metadata: "@suite-common/wallet-utils": "workspace:*" "@suite-native/alerts": "workspace:*" "@suite-native/atoms": "workspace:*" - "@suite-native/device": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/forms": "workspace:*" "@suite-native/icons": "workspace:*" "@suite-native/intl": "workspace:*" @@ -13538,6 +13560,7 @@ __metadata: "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" "@suite-native/clipboard": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/device": "workspace:*" "@suite-native/device-authorization": "workspace:*" "@suite-native/device-manager": "workspace:*" @@ -13679,7 +13702,7 @@ __metadata: "@suite-native/alerts": "workspace:*" "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" - "@suite-native/device": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/forms": "workspace:*" "@suite-native/icons": "workspace:*" "@suite-native/intl": "workspace:*" @@ -13751,6 +13774,7 @@ __metadata: "@suite-native/analytics": "workspace:*" "@suite-native/atoms": "workspace:*" "@suite-native/clipboard": "workspace:*" + "@suite-native/confirm-on-trezor": "workspace:*" "@suite-native/device": "workspace:*" "@suite-native/device-mutex": "workspace:*" "@suite-native/helpers": "workspace:*"