Skip to content

Commit

Permalink
chore: Hide remove sss button (#2219)
Browse files Browse the repository at this point in the history
* chore: Hide remove sss button

* chore: isFeature enabled
  • Loading branch information
devkudasov committed Dec 4, 2024
1 parent 75281a2 commit c640842
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/settings/settings-security/settings-security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
TextPosition,
TextVariant,
} from '@app/components/ui';
import {Feature, isFeatureEnabled} from '@app/helpers/is-feature-enabled';
import {I18N, getText} from '@app/i18n';
import {AppStore} from '@app/models/app';
import {BiometryType} from '@app/types';
Expand Down Expand Up @@ -126,14 +127,17 @@ export const SettingsSecurity = ({
</First>
</View>
)}
<MenuNavigationButton onPress={onSssRemove}>
<DataContent
titleI18n={I18N.deleteSssTitle}
titleColor={Color.textRed1}
subtitleI18n={I18N.deleteSssDescription}
subtitleI18nParams={{walletType: 'Google'}}
/>
</MenuNavigationButton>
{/* FIXME: Enable this option into next releases when shares migration will be fixed */}
{isFeatureEnabled(Feature.removeSss) && (
<MenuNavigationButton onPress={onSssRemove}>
<DataContent
titleI18n={I18N.deleteSssTitle}
titleColor={Color.textRed1}
subtitleI18n={I18N.deleteSssDescription}
subtitleI18nParams={{walletType: 'Google'}}
/>
</MenuNavigationButton>
)}
<Spacer />
</View>
);
Expand Down
3 changes: 3 additions & 0 deletions src/helpers/is-feature-enabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum Feature {
tokens,
// right to left
rtl,
removeSss,
}

export const isFeatureEnabled = (feature: Feature): boolean => {
Expand All @@ -22,6 +23,8 @@ export const isFeatureEnabled = (feature: Feature): boolean => {
return true;
case Feature.rtl:
return false;
case Feature.removeSss:
return false;
default:
return false;
}
Expand Down

0 comments on commit c640842

Please sign in to comment.