diff --git a/packages/suite/src/constants/suite/experimental.ts b/packages/suite/src/constants/suite/experimental.ts index 45e6721e889..1c96d8b7fd8 100644 --- a/packages/suite/src/constants/suite/experimental.ts +++ b/packages/suite/src/constants/suite/experimental.ts @@ -5,7 +5,7 @@ import { Route } from '@suite-common/suite-types'; import { Dispatch } from '../../types/suite'; -export type ExperimentalFeature = 'password-manager' | 'tor-snowflake'; +export type ExperimentalFeature = 'password-manager' | 'tor-snowflake' | 'tor-external'; export type ExperimentalFeatureConfig = { title: TranslationKey; @@ -39,4 +39,19 @@ export const EXPERIMENTAL_FEATURES: Record { + const result = await desktopApi.getTorSettings(); + if (result.success && result.payload.useExternalTor !== newValue) { + await desktopApi.changeTorSettings({ + ...result.payload, + useExternalTor: newValue, + }); + } + }, + }, }; diff --git a/packages/suite/src/support/messages.ts b/packages/suite/src/support/messages.ts index 388e72c5b3b..ea3da7d84be 100644 --- a/packages/suite/src/support/messages.ts +++ b/packages/suite/src/support/messages.ts @@ -5010,6 +5010,15 @@ export default defineMessages({ defaultMessage: 'Access censored websites and apps using Tor Snowflake, a system designed to bypass restrictions.', }, + TR_EXPERIMENTAL_TOR_EXTERNAL: { + id: 'TR_EXPERIMENTAL_TOR_EXTERNAL', + defaultMessage: 'Tor external', + }, + TR_EXPERIMENTAL_TOR_EXTERNAL_DESCRIPTION: { + id: 'TR_EXPERIMENTAL_TOR_EXTERNAL_DESCRIPTION', + defaultMessage: + 'Allows you to use Tor daemon running in a external process on port 9050 instead of the one bundled with Trezor Suite.', + }, TR_EARLY_ACCESS: { id: 'TR_EARLY_ACCESS', defaultMessage: 'Early Access Program',