Skip to content

[Bug] Unable to add Lattice1 accounts - error displayed #33232

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

Closed
vivek-consensys opened this issue May 28, 2025 · 4 comments · Fixed by #33513
Closed

[Bug] Unable to add Lattice1 accounts - error displayed #33232

vivek-consensys opened this issue May 28, 2025 · 4 comments · Fixed by #33513
Assignees
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. regression-prod-12.18.1 Regression bug that was found in production in release 12.18.1 regression-RC-12.20.0 Regression bug that was found in release candidate (RC) for release 12.20.0 release-12.22.0 Issue or pull request that will be included in release 12.22.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-wallet-framework type-bug Something isn't working

Comments

@vivek-consensys
Copy link

v12.20.0
Chrome

  1. Install MM
  2. Recover from SRP
  3. Add hardware wallet
  4. Import Lattice1 account
  5. Error displayed

Expected:- Account to be imported
Actual:-

Private Zenhub Video

@vivek-consensys vivek-consensys added type-bug Something isn't working Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. release-blocker This bug is blocking the next release team-hardware-wallets regression-RC-12.20.0 Regression bug that was found in release candidate (RC) for release 12.20.0 labels May 28, 2025
@github-project-automation github-project-automation bot moved this to To be triaged in Bugs by team May 28, 2025
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity May 28, 2025
@metamaskbot metamaskbot added the INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. label May 28, 2025
@vivek-consensys vivek-consensys added regression-prod-12.18.1 Regression bug that was found in production in release 12.18.1 and removed release-blocker This bug is blocking the next release labels May 28, 2025
@gn-z1109 gn-z1109 assigned Akaryatrh and unassigned dawnseeker8 Jun 3, 2025
@Akaryatrh
Copy link
Contributor

Update: feature has stopped working with this commit. We believe the related PR is this one #32621

@mikesposito issue probably comes from a Keyring controller update, as debugged by @dawnseeker8 it seems that inside persistOrRollback function the old and new states returns the same references for Lattice.

@mikesposito
Copy link
Member

mikesposito commented Jun 5, 2025

The issue appears to be caused by Lattice keyring returning an internal array through .serialize(). Specifically, KeyringController will use the .serialize() return value to compare keyring state when evaluating whether a vault update is needed.

I see two separate fixes needed here:

  • Lattice keyring should never return an internal array through any of its public methods that are not intended as mutable
  • We can consider alternatives for KeyringController's comparison mechanism, to avoid similar issues in the future due to dev error

@gn-z1109
Copy link

gn-z1109 commented Jun 6, 2025

reassigned to @mikesposito - fyi we are working on opening a pull request on lattice repo

github-merge-queue bot pushed a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by severity Jun 10, 2025
@metamaskbot metamaskbot added the release-12.22.0 Issue or pull request that will be included in release 12.22.0 label Jun 10, 2025
DDDDDanica pushed a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
runway-github bot added a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
runway-github bot added a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
runway-github bot pushed a commit that referenced this issue Jun 10, 2025
…o `^22.0.2` (#33513)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
runway-github bot added a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
runway-github bot added a commit that referenced this issue Jun 10, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
DDDDDanica pushed a commit that referenced this issue Jun 10, 2025
- fix: bump `@metamask/keyring-controller` to `^22.0.2` (#33513)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub

Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding

Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
[fd2d065](fd2d065)

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
DDDDDanica pushed a commit that referenced this issue Jun 10, 2025
…o `^22.0.2` cp-12.20.0 (#33567)

- fix: bump `@metamask/keyring-controller` to `^22.0.2` (#33513)

<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **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?
-->
See changelog for details:

```markdown
## [22.0.2]

### Fixed

- Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](MetaMask/core#5928))
  - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.

```

[![Open in GitHub

Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/33513?quickstart=1)

## **Related issues**

* Fixes: #33232

## **Manual testing steps**

1. Pair new Lattice device
2. Check the pairing step works as expected, and that a new Lattice
account has been added

## **Screenshots/Recordings**

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

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding

Standards](https://github.com/MetaMask/metamask-extension/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-extension/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.
[fd2d065](fd2d065)

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
INVALID-ISSUE-TEMPLATE Issue's body doesn't match any issue template. regression-prod-12.18.1 Regression bug that was found in production in release 12.18.1 regression-RC-12.20.0 Regression bug that was found in release candidate (RC) for release 12.20.0 release-12.22.0 Issue or pull request that will be included in release 12.22.0 Sev1-high High severity; partial loss of service with severe impact upon users, with no workaround. team-wallet-framework type-bug Something isn't working
Projects
Archived in project
Status: To be triaged
Development

Successfully merging a pull request may close this issue.

6 participants