Skip to content

Conversation

@jeffsmale90
Copy link
Contributor

@jeffsmale90 jeffsmale90 commented Feb 18, 2025

#5301 introduced a new method for signing EIP-7702 Authorizations.

This change adds validation to ensure that contractAddress is specified, rather than type asserting the contractAddress to Hex.

@jeffsmale90 jeffsmale90 requested review from a team and Gudahtt February 18, 2025 03:54
@ccharly ccharly changed the title Ensure authorization contract address is provided. refactor(keyring-controller): ensure authorization contract address is provided Feb 18, 2025
@jeffsmale90 jeffsmale90 requested a review from ccharly February 19, 2025 06:46
@ccharly ccharly merged commit 8cc5322 into main Feb 19, 2025
134 checks passed
@ccharly ccharly deleted the fix/eip7702_validation branch February 19, 2025 08:46
github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Mar 25, 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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
mikesposito added a commit to MetaMask/metamask-extension that referenced this pull request Mar 25, 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?
-->
Bumping `@metamask/keyring-controller` to 19.2.2

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

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

## **Related issues**

Related: #31200

## **Manual testing steps**

1. Start with an installation from before we introduced
keyringsMetadata, proceed past onboarding so that you have a vault setup
(e.g. v12.12.0)
2. Upgrade to this branch
3. Start the extension (without logging in)
4. Leave the window open a while to give it time to initialize all
controllers
5. Reload the extension before unlocking
6. Try to unlock the wallet

## **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.

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
runway-github bot added a commit to MetaMask/metamask-mobile that referenced this pull request Mar 25, 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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
runway-github bot added a commit to MetaMask/metamask-mobile that referenced this pull request Mar 25, 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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
runway-github bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Mar 25, 2025
…o `^19.2.2` (#14229)

<!--
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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
MarioAslau pushed a commit to MetaMask/metamask-mobile that referenced this pull request Mar 25, 2025
…o `^19.2.2` (#14236)

- fix: bump `@metamask/keyring-controller` to `^19.2.2` (#14229)

<!--
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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
[99faccf](99faccf)

Co-authored-by: Michele Esposito <34438276+mikesposito@users.noreply.github.com>
sethkfman pushed a commit to MetaMask/metamask-mobile that referenced this pull request Apr 9, 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?
-->
`@metamask/keyring-controller` is being updated to 19.2.2 including the
following changes:

```markdown
## [19.2.2]

### Fixed

- Fixed duplication of unsupported keyrings ([#5535](MetaMask/core#5535))
- Enforce keyrings metadata alignment when unlocking existing vault ([#5535](MetaMask/core#5535))
- Fixed frozen object mutation attempt when updating metadata ([#5535](MetaMask/core#5535))

## [19.2.1]

### Changed

- Bump `@metamask/keyring-api"` from `^17.0.0` to `^17.2.0` ([#5366](MetaMask/core#5366))
- Bump `@metamask/keyring-internal-api` from `^4.0.1` to `^4.0.3` ([#5356](MetaMask/core#5356)), ([#5366](MetaMask/core#5366))

### Fixed

- Ensure authorization contract address is provided ([#5353](MetaMask/core#5353))
```

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants