Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(suite-native): remove the Sync my coins button from the Home screen #16108

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion suite-native/intl/src/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const en = {
},
},
buttons: {
syncMyCoins: 'Sync my coins',
receive: 'Receive',
},
biometricsModal: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { forwardRef } from 'react';

import { useNavigation } from '@react-navigation/native';

import { Box, Button, Divider, VStack } from '@suite-native/atoms';
import { Box, Button, VStack } from '@suite-native/atoms';
import { Assets } from '@suite-native/assets';
import { FeatureFlag, useFeatureFlag } from '@suite-native/feature-flags';
import {
AccountsImportStackRoutes,
RootStackParamList,
RootStackRoutes,
StackNavigationProps,
Expand All @@ -22,14 +20,6 @@ export const PortfolioContent = forwardRef<PortfolioGraphRef>((_props, ref) => {

const isPortfolioTrackerDevice = useSelector(selectIsPortfolioTrackerDevice);

const [isUsbDeviceConnectFeatureEnabled] = useFeatureFlag(FeatureFlag.IsDeviceConnectEnabled);

const handleImportAssets = () => {
navigation.navigate(RootStackRoutes.AccountsImport, {
screen: AccountsImportStackRoutes.SelectNetwork,
});
};

const handleReceive = () => {
navigation.navigate(RootStackRoutes.ReceiveModal, { closeActionType: 'back' });
};
Expand All @@ -42,31 +32,14 @@ export const PortfolioContent = forwardRef<PortfolioGraphRef>((_props, ref) => {
<Assets />
</Box>
{isPortfolioTrackerDevice && (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IsDeviceConnectEnabled FF is configured in such a way that using !isUsbDeviceConnectFeatureEnabled hides the Recieve button in Simulator even though it's visible in the dev app.

<Box marginBottom="sp8">
<Button
testID="@home/portfolio/sync-coins-button"
colorScheme="tertiaryElevation0"
size="large"
onPress={handleImportAssets}
>
<Translation id="moduleHome.buttons.syncMyCoins" />
</Button>
</Box>
)}
{!isUsbDeviceConnectFeatureEnabled && (
<>
<Divider />
<Box>
<Button
data-testID="@home/portolio/recieve-button"
size="large"
onPress={handleReceive}
viewLeft="arrowLineDown"
>
<Translation id="moduleHome.buttons.receive" />
</Button>
</Box>
</>
<Button
data-testID="@home/portolio/recieve-button"
size="large"
onPress={handleReceive}
viewLeft="arrowLineDown"
>
<Translation id="moduleHome.buttons.receive" />
</Button>
)}
</VStack>
</VStack>
Expand Down
Loading