-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add SES experiment toggle (iOS) (#8373)
## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> A feature toggle for SES, within our settings menu under experiments, enabled by default TODO - [x] add `react-native-mmkv` - [x] MVP - [x] ensure only visible on iOS not Android - show only on iOS - or show if storage key exists - [x] check next to Blockaid experiment enabled - [x] fix test, update snapshot - [x] add descriptive content - [x] translate text - [x] update styling - [x] <s>replace `react-native-mmkv` with `react-native-default-preference`</s> - attempted in ea5674c but only [partially working](#8373 (comment)) - [x] fix Android debug bundling on Hermes - [x] <s>consider content revision to include _Hardened JS_ and _SES (Secure EcmaScript)_ terms</s> - [x] update to newly discussed text with link - [x] fix styling, move switch above next to title - [x] display both SES and Blockaid under same _Security_ heading - [x] preserve Android UI - [x] update SES to be enabled by default ## **Related issues** Fixes: partially mitigates rollout risk Follow-up to - #8033 ## **Manual testing steps** iOS - boot app - login / create wallet - go to bottom tab Settings menu - open Experimental menu - _SES enabled by default, like currently in (main) branch_ - disable SES ft toggle - reboot app - _SES now disabled_ - verify in Experimental menu - repeat steps above to re-enable Android - boot app - login / create wallet - go to bottom tab Settings menu - open Experimental menu - UI remains the same - Blockaid shown if feature is enabled ## **Screenshots/Recordings** Previous MVP video (old UI) [demo](https://consensys.slack.com/archives/C02U025CVU4/p1706035121992709?thread_ts=1705527596.738189&cid=C02U025CVU4) showing the behaviour, a simple settings menu ft toggle that persists, enabling/disabling lockdown upon app reboot, on iOS only Android remains unchanged ([Blockaid disabled](https://github.com/MetaMask/metamask-mobile/assets/1881059/d74a30be-e65e-4832-a21e-8aa1812df608), [Blockaid enabled](https://github.com/MetaMask/metamask-mobile/assets/1881059/77b9a24b-486b-4e6b-aa10-51eede8c2951)) ### **Before** Blockaid ft disabled <img width="403" alt="Screenshot 2024-01-26 at 7 20 46 pm" src="https://github.com/MetaMask/metamask-mobile/assets/1881059/ec120e0a-9ba5-454c-b4c8-21307ced7ea5"> Blockaid ft enabled <img width="402" alt="Screenshot 2024-01-26 at 7 25 05 pm" src="https://github.com/MetaMask/metamask-mobile/assets/1881059/4be5fda0-edfe-427f-8206-df6df100a6fc"> ### **After** Blockaid ft disabled <img width="403" alt="Screenshot 2024-01-30 at 1 07 07 pm" src="https://github.com/MetaMask/metamask-mobile/assets/1881059/bca71f83-ab01-4d70-bbc1-fac00dd76e23"> Blockaid ft enabled <img width="401" alt="Screenshot 2024-01-30 at 1 07 48 pm" src="https://github.com/MetaMask/metamask-mobile/assets/1881059/7d12aa9a-51e9-44d8-a6d0-6d9ca8aa9375"> Navigating to [Learn more](https://github.com/endojs/endo/blob/master/packages/ses/README.md) <img width="401" alt="Screenshot 2024-01-26 at 6 52 17 pm" src="https://github.com/MetaMask/metamask-mobile/assets/1881059/a32d47b3-e95e-4a15-b745-3cbc7c444250"> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [x] I've linked related issues - [x] I've included manual testing steps - [x] I've included screenshots/recordings if applicable - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] 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. - [x] I’ve properly set the pull request status: - [x] In case it's not yet "ready for review", I've set it to "draft". - [x] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **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. --------- Co-authored-by: sethkfman <10342624+sethkfman@users.noreply.github.com> Co-authored-by: sethkfman <seth.kaufman@consensys.net>
- Loading branch information
1 parent
a3ea469
commit 6f84f18
Showing
6 changed files
with
366 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.