Skip to content

Commit

Permalink
feat(suite-desktop): autostat option only in debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Nov 6, 2024
1 parent 55d663c commit 10b750a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { TorSnowflake } from './TorSnowflake';
import { AutomaticUpdate } from './AutomaticUpdate';
import { AutoStart } from './AutoStart';
import { ShowOnTray } from './ShowOnTray';
import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer';

Check failure on line 37 in packages/suite/src/views/settings/SettingsGeneral/SettingsGeneral.tsx

View workflow job for this annotation

GitHub Actions / Linting and formatting

'src/reducers/suite/suiteReducer' imported multiple times

export const SettingsGeneral = () => {
const shouldShowSettingsDesktopAppPromoBanner = useSelector(
Expand All @@ -57,6 +58,7 @@ export const SettingsGeneral = () => {

const isMetadataEnabled = metadata.enabled && !metadata.initiating;
const isProviderConnected = useSelector(selectSelectedProviderForLabels);
const isDebugModeActive = useSelector(selectIsDebugModeActive);

return (
<SettingsLayout data-testid="@settings/index">
Expand Down Expand Up @@ -102,7 +104,7 @@ export const SettingsGeneral = () => {
<EnableViewOnly />
</SettingsSection>

{isDesktop() && (
{isDesktop() && isDebugModeActive && (
<SettingsSection title={<Translation id="TR_TREZOR_CONNECT" />} icon="plugs">
<AutoStart />
<ShowOnTray />
Expand Down
6 changes: 4 additions & 2 deletions packages/suite/src/views/suite/bridge-requested/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ import styled from 'styled-components';
import { Translation, Modal, Metadata } from 'src/components/suite';
import { Button, Card, Image, Text } from '@trezor/components';
import { goto } from 'src/actions/suite/routerActions';
import { useDispatch, useLayout } from 'src/hooks/suite';
import { useDispatch, useLayout, useSelector } from 'src/hooks/suite';
import { desktopApi } from '@trezor/suite-desktop-api';
import { AutoStart } from 'src/views/settings/SettingsGeneral/AutoStart';
import { isDesktop } from '@trezor/env-utils';
import { spacings } from '@trezor/theme';
import { selectIsDebugModeActive } from 'src/reducers/suite/suiteReducer';

const StyledModal = styled(Modal)`
${Modal.BottomBar} {
Expand Down Expand Up @@ -47,6 +48,7 @@ export const BridgeRequested = () => {
};

useLayout('Bridge');
const isDebugModeActive = useSelector(selectIsDebugModeActive);

if (confirmGoToWallet) {
return (
Expand Down Expand Up @@ -97,7 +99,7 @@ export const BridgeRequested = () => {
<Metadata title="Bridge | Trezor Suite" />
<StyledImage image="CONNECT_DEVICE" width="360" />

{isDesktop() && (
{isDesktop() && isDebugModeActive && (
<>
<Text
typographyStyle="hint"
Expand Down

0 comments on commit 10b750a

Please sign in to comment.