Skip to content

Cherry-picking commits from main to release/8.20.1-ota for PR #39037 - #39836

Merged
vpintorico merged 1 commit into
release/8.20.1-otafrom
runway-cherry-pick-8.20.1-1794842972
Nov 16, 2026
Merged

vpintorico merged 1 commit into
release/8.20.1-otafrom
runway-cherry-pick-8.20.1-1794842972

Conversation

@runway-github

@runway-github runway-github Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Description

Customers who have started identity verification can delete the
encrypted identity data MetaMask holds from Security settings, without a
separate screen.

The section appears only when the money-account flag is on and a KYC
session exists. Confirming calls
KycController.deleteEncryptedStorage(). That requires
@metamask/kyc-controller 0.15.0 and the KycService:createDeletion
and KycService:completeDeletion messenger actions. Cancelling the
confirmation leaves the data in place.

Performance checks do not apply: this is a static settings section with
no lists, polling, or animation. It has not been exercised on a device
yet.

Changelog

CHANGELOG entry: Added a Security settings control to delete encrypted
identity verification data.

Related issues

Fixes:

Refs: #38381

Manual testing steps

Feature: delete identity data from Security settings

  Scenario: the section stays hidden until verification has started
    Given the money-account feature flag is off or there is no KYC session
    When I open Security settings
    Then I do not see "Delete Identity Data"

  Scenario: confirming deletes the encrypted identity data
    Given the money-account feature flag is on and a KYC session exists
    When I open Security settings
    And I tap "Delete identity data"
    And I confirm "This cannot be undone."
    Then the app deletes the encrypted identity data and reports success

  Scenario: cancelling leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and then cancel
    Then nothing is deleted

Screenshots/Recordings

Before

N/A

After

Screenshot 2026-11-06 at 12 54 42 PM
Screenshot 2026-11-06 at 12 54 50 PM
Screenshot 2026-11-06 at 12 54 24 PM

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
  • Use these power-user
    SRPs

    to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production
    performance metrics
  • See trace() for usage and
    addToken
    for an example

For performance guidelines and tooling, see the Performance
Guide
.

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.

Description

Customers who have started identity verification can delete the
encrypted identity data MetaMask holds from Security settings, without a
separate screen.

The section appears only when the money-account flag is on and a KYC
session exists. Confirming asks for an email one-time code, then calls
KycController.deleteEncryptedStorage({ aal2Token }) with that
verification token. That requires @metamask/kyc-controller 0.16.0 and
the KycService:createDeletion and KycService:completeDeletion
messenger actions. Cancelling the confirmation, or backing out of the
email check, leaves the data in place.

Performance checks do not apply: this is a static settings section with
no lists, polling, or animation. It has not been exercised on a device
yet.

Changelog

CHANGELOG entry: Added a Security settings control to delete encrypted
identity verification data.

Related issues

Fixes:

Refs: #38381

Manual testing steps

Feature: delete identity data from Security settings

  Scenario: the section stays hidden until verification has started
    Given the money-account feature flag is off or there is no KYC session
    When I open Security settings
    Then I do not see "Delete Identity Data"

  Scenario: confirming deletes the encrypted identity data
    Given the money-account feature flag is on and a KYC session exists
    When I open Security settings
    And I tap "Delete identity data"
    And I confirm "This cannot be undone."
    And I complete the email one-time code check
    Then the app deletes the encrypted identity data and reports success

  Scenario: cancelling leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and then cancel
    Then nothing is deleted

  Scenario: backing out of email verification leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and confirm
    And I back out of the email one-time code check
    Then nothing is deleted and no error is shown

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
  • Use these power-user
    SRPs

    to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production
    performance metrics
  • See trace() for usage and
    addToken
    for an example

For performance guidelines and tooling, see the Performance
Guide
.

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.
Open in Web Open in Cursor 

Note

Medium Risk
Introduces user-triggered deletion of encrypted KYC data with MFA
gating; mistakes could affect identity verification state, but scope is
limited to customers with an active session and the feature flag.

Reviewed by Cursor Bugbot for commit
23be80c. Bugbot is set up for automated
code reviews on this repo. Configure
here.


Signed-off-by: Sébastien Van Eyck sebastien.vaneyck@consensys.net
Co-authored-by: Cursor cursoragent@cursor.com
Co-authored-by: Sébastien Van Eyck sebastien.vaneyck@consensys.net 3d642d6

)

## **Description**

<!-- mms-check: type=text required=true -->

<!--
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?
-->

Customers who have started identity verification can delete the
encrypted identity data MetaMask holds from Security settings, without a
separate screen.

The section appears only when the money-account flag is on and a KYC
session exists. Confirming calls
`KycController.deleteEncryptedStorage()`. That requires
`@metamask/kyc-controller` 0.15.0 and the `KycService:createDeletion`
and `KycService:completeDeletion` messenger actions. Cancelling the
confirmation leaves the data in place.

Performance checks do not apply: this is a static settings section with
no lists, polling, or animation. It has not been exercised on a device
yet.

## **Changelog**

<!-- mms-check: type=changelog required=true blocking=true -->

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Added a Security settings control to delete encrypted
identity verification data.

## **Related issues**

<!-- mms-check: type=issue-link required=true -->

Fixes:

Refs: #38381

## **Manual testing steps**

<!-- mms-check: type=manual-testing required=true -->

```gherkin
Feature: delete identity data from Security settings

  Scenario: the section stays hidden until verification has started
    Given the money-account feature flag is off or there is no KYC session
    When I open Security settings
    Then I do not see "Delete Identity Data"

  Scenario: confirming deletes the encrypted identity data
    Given the money-account feature flag is on and a KYC session exists
    When I open Security settings
    And I tap "Delete identity data"
    And I confirm "This cannot be undone."
    Then the app deletes the encrypted identity data and reports success

  Scenario: cancelling leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and then cancel
    Then nothing is deleted
```

## **Screenshots/Recordings**

<!-- mms-check: type=screenshot required=true -->

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

N/A

### **After**

<img width="444" height="919" alt="Screenshot 2026-11-06 at 12 54 42 PM"
src="https://github.com/user-attachments/assets/3f8afa12-1926-40ce-93d5-496623d0e8bf"
/>
<img width="443" height="895" alt="Screenshot 2026-11-06 at 12 54 50 PM"
src="https://github.com/user-attachments/assets/87c92809-76f2-44eb-ad2e-21719cb2af10"
/>
<img width="455" height="881" alt="Screenshot 2026-11-06 at 12 54 24 PM"
src="https://github.com/user-attachments/assets/2db0bb77-bbde-4617-9ed2-483cdd396a53"
/>



## **Pre-merge author checklist**

<!-- mms-check: type=checklist required=true -->

<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.

Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->

- [x] 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).
- [x] I've completed the PR template to the best of my ability
- [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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->

- [ ] 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.

<!-- Generated with the help of the pr-description AI skill -->

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## **Description**

<!-- mms-check: type=text required=true -->

<!--
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?
-->

Customers who have started identity verification can delete the
encrypted identity data MetaMask holds from Security settings, without a
separate screen.

The section appears only when the money-account flag is on and a KYC
session exists. Confirming asks for an email one-time code, then calls
`KycController.deleteEncryptedStorage({ aal2Token })` with that
verification token. That requires `@metamask/kyc-controller` 0.16.0 and
the `KycService:createDeletion` and `KycService:completeDeletion`
messenger actions. Cancelling the confirmation, or backing out of the
email check, leaves the data in place.

Performance checks do not apply: this is a static settings section with
no lists, polling, or animation. It has not been exercised on a device
yet.

## **Changelog**

<!-- mms-check: type=changelog required=true blocking=true -->

<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`

If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`

(This helps the Release Engineer do their job more quickly and
accurately)
-->

CHANGELOG entry: Added a Security settings control to delete encrypted
identity verification data.

## **Related issues**

<!-- mms-check: type=issue-link required=true -->

Fixes:

Refs: #38381

## **Manual testing steps**

<!-- mms-check: type=manual-testing required=true -->

```gherkin
Feature: delete identity data from Security settings

  Scenario: the section stays hidden until verification has started
    Given the money-account feature flag is off or there is no KYC session
    When I open Security settings
    Then I do not see "Delete Identity Data"

  Scenario: confirming deletes the encrypted identity data
    Given the money-account feature flag is on and a KYC session exists
    When I open Security settings
    And I tap "Delete identity data"
    And I confirm "This cannot be undone."
    And I complete the email one-time code check
    Then the app deletes the encrypted identity data and reports success

  Scenario: cancelling leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and then cancel
    Then nothing is deleted

  Scenario: backing out of email verification leaves the identity data in place
    Given the delete section is visible
    When I tap "Delete identity data" and confirm
    And I back out of the email one-time code check
    Then nothing is deleted and no error is shown
```

## **Screenshots/Recordings**

<!-- mms-check: type=screenshot required=true -->

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

N/A

### **After**

N/A

## **Pre-merge author checklist**

<!-- mms-check: type=checklist required=true -->

<!--
Every checklist item must be consciously assessed before marking this PR
as
"Ready for review". A checked box means you deliberately considered that
responsibility, not that you literally performed every action listed.

Unchecked boxes are ambiguous: they are not an implicit "N/A" and they
are not
a silent "skip". See `docs/readme/ready-for-review.md` for the full
checklist
semantics.
-->

- [x] 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).
- [x] I've completed the PR template to the best of my ability
- [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.

#### Performance checks (if applicable)

- [x] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [x] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [x] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

For performance guidelines and tooling, see the [Performance
Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers).

## **Pre-merge reviewer checklist**

<!--
Reviewer checklist items follow the same semantics as the author
checklist: an
unchecked box is ambiguous, a checked box means the reviewer consciously
assessed that responsibility. See `docs/readme/ready-for-review.md`.
-->

- [ ] 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.

<!-- Generated with the help of the pr-description AI skill -->

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-6f157964-72b0-5445-87a7-0edda2664e74?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-6f157964-72b0-5445-87a7-0edda2664e74&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Introduces user-triggered deletion of encrypted KYC data with MFA
gating; mistakes could affect identity verification state, but scope is
limited to customers with an active session and the feature flag.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
23be80c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Signed-off-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Sébastien Van Eyck <sebastien.vaneyck@consensys.net>
@runway-github
runway-github Bot requested a review from a team as a code owner November 16, 2026 15:29
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamask-ci metamask-ci Bot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Nov 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Smart E2E Test Selection

Selected E2E tags: ALL

AI Confidence: 100

E2E reasoning

Expand to read

This PR introduces a new "Delete Identity Data" section in the Security Settings screen and adds new locale strings to en.json.

Key changes:

  1. New DeleteIdentityData component — Added to Security Settings, gated by selectNeobankMarkets feature flag and kycSessionStatus. Uses MFA verification flow and calls Engine to delete identity data.
  2. SecuritySettings.tsx modified — The <DeleteIdentityData /> component is inserted between <DeleteWalletData /> and <TopTradersSection />, changing the layout of the Security Settings screen.
  3. locales/languages/en.json modified — 11 new strings added under identity_verification key. The hard rule (en-locale-change) mandates ALL tags since copy feeds UI and E2E text/label selectors.
  4. New test ID constant — SECURITY_SETTINGS_DELETE_IDENTITY_DATA_BUTTON added to constants.

Risk factors:

  • The locale change alone triggers the ALL hard rule seed — new strings could affect any E2E test that uses text-based selectors in settings flows.
  • The Security Settings screen modification (new section inserted) could affect E2E tests that scroll through or interact with Security Settings (SmokeAccounts for SRP reveal, SmokeMoney for card/neobank flows, SmokeWalletPlatform for wallet lifecycle).
  • The new component is conditionally rendered based on feature flags (selectNeobankMarkets), so it may or may not appear in E2E environments depending on flag state — but its presence in the DOM could shift layout and affect tap targets.
  • The MFA flow integration touches authentication-adjacent code paths.

The ALL selection from the hard rule seed is appropriate and conservative given the locale change and Security Settings screen modification.

View run

@github-actions github-actions Bot added the risk:low AI analysis: low risk label Nov 16, 2026
@sonarqubecloud

Copy link
Copy Markdown

@vpintorico
vpintorico merged commit 7d0e55f into release/8.20.1-ota Nov 16, 2026
191 of 193 checks passed
@vpintorico
vpintorico deleted the runway-cherry-pick-8.20.1-1794842972 branch November 16, 2026 17:59
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk:low AI analysis: low risk size-M team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants