Skip to content

Commit 6684df3

Browse files
authored
chore: Remove permissions settings feature flag (#29685)
## **Description** Removes `MM_PERMISSIONS_SETTINGS_V1_ENABLED` now that it only gates the SDK Connections Management view. The row is now always shown and continues to navigate to the existing SDK sessions manager. ## **Changelog** CHANGELOG entry: Added back access to SDK connections management. ## **Related issues** Fixes: WAPI-1468 ## **Manual testing steps** Feature: Account menu permissions entry Scenario: user opens the SDK connection manager from the account menu Given the user is in MetaMask Mobile When user opens the account menu Then the Permissions row is visible When user taps Permissions Then the SDK connections manager opens ## **Screenshots/Recordings** N/A ### **Before** N/A ### **After** https://github.com/user-attachments/assets/e89156fd-b9f2-4a55-b3b5-22576f3cf53f ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: removes a now-unused env flag and makes the Accounts menu Permissions row unconditional, with only minor UI/test/CI config updates. > > **Overview** > **Removes the `MM_PERMISSIONS_SETTINGS_V1_ENABLED` feature flag** and its wiring across the app/config. > > The Accounts menu now **always renders the Permissions row** (no gating), and related unit tests/CI env examples are updated to drop the flag. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d1ca060. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent fd40dc0 commit 6684df3

7 files changed

Lines changed: 9 additions & 32 deletions

File tree

.js.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,6 @@ export MM_SAMPLE_FEATURE_COUNTER_ENABLED="true"
100100
# The endpoint used to submit errors and tracing data to Sentry for dev environment.
101101
# export MM_SENTRY_DSN_DEV=
102102

103-
# Permissions Settings feature flag specific to UI changes
104-
export MM_PERMISSIONS_SETTINGS_V1_ENABLED=""
105-
106103
# Earn Variables
107104
## Stablecoin Lending
108105
export MM_STABLECOIN_LENDING_UI_ENABLED="true"

app/components/Views/AccountsMenu/AccountsMenu.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ jest.mock('../../../../locales/i18n', () => ({
9696
strings: jest.fn((key: string) => key),
9797
}));
9898

99-
jest.mock('../../../util/networks', () => ({
100-
...jest.requireActual('../../../util/networks'),
101-
isPermissionsSettingsV1Enabled: true,
102-
}));
103-
10499
jest.mock('../../UI/Ramp/hooks/useRampsUnifiedV1Enabled', () => ({
105100
__esModule: true,
106101
default: jest.fn(() => false),

app/components/Views/AccountsMenu/AccountsMenu.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import Routes from '../../../constants/navigation/Routes';
2525
import { strings } from '../../../../locales/i18n';
2626
import { useAnalytics } from '../../hooks/useAnalytics/useAnalytics';
2727
import { AccountsMenuSelectorsIDs } from './AccountsMenu.testIds';
28-
import { isPermissionsSettingsV1Enabled } from '../../../util/networks';
2928
import useRampsUnifiedV1Enabled from '../../UI/Ramp/hooks/useRampsUnifiedV1Enabled';
3029
import useRampsUnifiedV2Enabled from '../../UI/Ramp/hooks/useRampsUnifiedV2Enabled';
3130
import AppConstants from '../../../core/AppConstants';
@@ -441,17 +440,15 @@ const AccountsMenu = () => {
441440
/>
442441

443442
{/* Permissions Row */}
444-
{isPermissionsSettingsV1Enabled && (
445-
<ActionListItem
446-
startAccessory={
447-
<Icon name={IconName.SecurityTick} size={IconSize.Lg} />
448-
}
449-
label={strings('accounts_menu.permissions')}
450-
endAccessory={arrowRightIcon}
451-
onPress={onPressPermissions}
452-
testID={AccountsMenuSelectorsIDs.PERMISSIONS}
453-
/>
454-
)}
443+
<ActionListItem
444+
startAccessory={
445+
<Icon name={IconName.SecurityTick} size={IconSize.Lg} />
446+
}
447+
label={strings('accounts_menu.permissions')}
448+
endAccessory={arrowRightIcon}
449+
onPress={onPressPermissions}
450+
testID={AccountsMenuSelectorsIDs.PERMISSIONS}
451+
/>
455452

456453
{/* Networks Row */}
457454
<ActionListItem

app/components/Views/Settings/index.test.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ jest.mock('@react-navigation/native', () => {
5252
};
5353
});
5454

55-
jest.mock('../../../util/networks', () => ({
56-
...jest.requireActual('../../../util/networks'),
57-
isPermissionsSettingsV1Enabled: true,
58-
}));
59-
6055
jest.mock('../../../util/notifications/constants/config', () => ({
6156
isNotificationsFeatureEnabled: jest.fn(() => true),
6257
}));

app/util/networks/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,6 @@ export const getBlockExplorerTxUrl = (
802802
export const getIsNetworkOnboarded = (chainId, networkOnboardedState) =>
803803
networkOnboardedState[chainId];
804804

805-
export const isPermissionsSettingsV1Enabled =
806-
process.env.MM_PERMISSIONS_SETTINGS_V1_ENABLED === 'true';
807-
808805
// The whitelisted network names for the given chain IDs to prevent showing warnings on Network Settings.
809806
export const WHILELIST_NETWORK_NAME = {
810807
[ChainId.mainnet]: 'Mainnet',

bitrise.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3493,9 +3493,6 @@ app:
34933493
- opts:
34943494
is_expand: false
34953495
MM_NETWORK_UI_REDESIGN_ENABLED: false
3496-
- opts:
3497-
is_expand: false
3498-
MM_PERMISSIONS_SETTINGS_V1_ENABLED: false
34993496
- opts:
35003497
is_expand: false
35013498
MM_SECURITY_ALERTS_API_ENABLED: true

builds.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ _public_envs: &public_envs # Servers (production)
4040
IS_TEST: 'false'
4141
SEEDLESS_ONBOARDING_ENABLED: 'true'
4242
MM_NOTIFICATIONS_UI_ENABLED: 'true'
43-
MM_PERMISSIONS_SETTINGS_V1_ENABLED: 'false'
4443
MM_PERPS_BLOCKED_REGIONS: 'US,CA-ON,GB,BE'
4544
MM_PERPS_HIP3_ALLOWLIST_MARKETS: ''
4645
MM_PERPS_HIP3_BLOCKLIST_MARKETS: ''

0 commit comments

Comments
 (0)