Skip to content

Commit

Permalink
fixup! feat(suite-native): Add coin behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
vytick committed Feb 27, 2024
1 parent 96631c5 commit 2e309f9
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions suite-native/accounts/src/components/AddAccountsButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ import {
StackNavigationProps,
} from '@suite-native/navigation';
import { IconButton } from '@suite-native/atoms';
import {
selectAreAllDevicesDisconnectedOrAccountless,
selectDeviceDiscovery,
selectIsPortfolioTrackerDevice,
} from '@suite-common/wallet-core';
import { selectDeviceDiscovery, selectIsPortfolioTrackerDevice } from '@suite-common/wallet-core';

import { useIsAddCoinAccountEnabled } from '../useIsAddCoinAccountEnabled';

Expand All @@ -24,14 +20,11 @@ export const AddAccountButton = () => {

const isSelectedDevicePortfolioTracker = useSelector(selectIsPortfolioTrackerDevice);
const discovery = useSelector(selectDeviceDiscovery);
const areAllDevicesDisconnectedOrAccountless = useSelector(
selectAreAllDevicesDisconnectedOrAccountless,
);

const { isAddCoinAccountEnabled } = useIsAddCoinAccountEnabled();

const shouldShowAddAccountButton =
isSelectedDevicePortfolioTracker ||
(isAddCoinAccountEnabled && !areAllDevicesDisconnectedOrAccountless && !discovery);
isSelectedDevicePortfolioTracker || (isAddCoinAccountEnabled && !discovery);

const navigateToImportScreen = () => {
navigation.navigate(RootStackRoutes.AccountsImport, {
Expand Down

0 comments on commit 2e309f9

Please sign in to comment.