Skip to content

Commit

Permalink
feat: Upgrade signature Controller to v14 (#9651)
Browse files Browse the repository at this point in the history
<!--
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?
-->

Update Signature Controller to v^14

Changelog:
https://github.com/MetaMask/core/blob/%40metamask/signature-controller%4016.0.0/packages/signature-controller/CHANGELOG.md

These two peer dependencies:
* BREAKING: Bump dependency and peer dependency on
@metamask/keyring-controller to ^14.0.0
(MetaMask/core#4039)
* BREAKING: Bump dependency and peer dependency on
@metamask/approval-controller to ^6.0.0
(MetaMask/core#4039)

These two controllers are being used inside Signature Controller to
import types.
These types have not been changed during the latest upgrades to these
controllers, thus not being a breaking changes for Signature Controller
V14.

## **Related issues**

- #9649

## **Manual testing steps**

1. Turn on MetaMask and log into wallet
2. Go to Settings > Advanced > Turn on Eth_sign requests
3. Go to mobile browser and access https://metamask.github.io/test-dapp/
4. Use MetaMask wallet and Connect Wallet
5. Scroll down and test signing in: Eth Sign, Perosnal Sign, Sign Typed
Data, Sign Typed Data V3, Sign Typed Data V4, Sign Permit, Sign in with
Ethereum
6. Verify each of the singings where the button is present


## **Screenshots/Recordings**

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

### **Before**

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

### **After**

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



https://github.com/MetaMask/metamask-mobile/assets/15312578/310565cd-5ca6-481b-8506-dc482a6bc2c1



## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask 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.

---------

Co-authored-by: tommasini <tommasini15@gmail.com>
  • Loading branch information
MarioAslau and tommasini authored May 22, 2024
1 parent a3fa3b3 commit 557499a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 21 deletions.
1 change: 0 additions & 1 deletion app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@ class Engine {
approvalController,
permissionController,
new SignatureController({
//@ts-expect-error Misalign types because of Base Controller version
messenger: this.controllerMessenger.getRestricted({
name: 'SignatureController',
allowedActions: [
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
boost: 7dcd2de282d72e344012f7d6564d024930a6a440
boost: 57d2868c099736d80fcd648bf211b4431e51a558
Branch: 4ac024cb3c29b0ef628048694db3c4cfa679beb0
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
"@metamask/rpc-errors": "^6.2.1",
"@metamask/scure-bip39": "^2.1.0",
"@metamask/sdk-communication-layer": "^0.20.2",
"@metamask/signature-controller": "^13.0.0",
"@metamask/signature-controller": "^14.0.0",
"@metamask/slip44": "3.1.0",
"@metamask/smart-transactions-controller": "10.0.0",
"@metamask/snaps-controllers": "^5.0.0",
Expand Down
59 changes: 41 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4243,16 +4243,26 @@
ethereumjs-wallet "^1.0.1"
immer "^9.0.6"

"@metamask/logging-controller@^2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@metamask/logging-controller/-/logging-controller-2.0.3.tgz#bedd17902fc6ffc1c9c703e3156827866753710b"
integrity sha512-3wA65IaE/jPLnqxoFtoQhllNIH31AtU8K3IlcsUqfDRPG6faVUj7I+pEKPVjdYGN90rWnzO6Axx/90FGQtUi6Q==
"@metamask/keyring-controller@^14.0.1":
version "14.0.1"
resolved "https://registry.yarnpkg.com/@metamask/keyring-controller/-/keyring-controller-14.0.1.tgz#019596a29a59d1b7cdc806c096bf3cba254e2657"
integrity sha512-lK4Zf5ek+eqstnPEQ6pwJPzj4Zt79in0atN2ttUPZi3IN/Xw5Il4nLrTQSSpcAxDwSble1hJibGTOPXAVA+lRg==
dependencies:
"@metamask/base-controller" "^4.1.1"
"@metamask/controller-utils" "^8.0.4"
uuid "^8.3.2"
"@ethereumjs/util" "^8.1.0"
"@keystonehq/metamask-airgapped-keyring" "^0.13.1"
"@metamask/base-controller" "^5.0.1"
"@metamask/browser-passworder" "^4.3.0"
"@metamask/eth-hd-keyring" "^7.0.1"
"@metamask/eth-sig-util" "^7.0.1"
"@metamask/eth-simple-keyring" "^6.0.1"
"@metamask/keyring-api" "^3.0.0"
"@metamask/message-manager" "^8.0.1"
"@metamask/utils" "^8.3.0"
async-mutex "^0.2.6"
ethereumjs-wallet "^1.0.1"
immer "^9.0.6"

"@metamask/logging-controller@^3.0.0":
"@metamask/logging-controller@^3.0.0", "@metamask/logging-controller@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@metamask/logging-controller/-/logging-controller-3.0.1.tgz#11c2b127bc2d7d4b753e2d757b0c09bf2742bf0a"
integrity sha512-+rIkpsLnBeTbx7IoL998E1/LgBbNP/1TPg6hlTbLUuXgKj6C/XFO47tMPxQOp7Ut8njVfKAkLV5QqtB+4rKHkg==
Expand All @@ -4274,6 +4284,19 @@
jsonschema "^1.2.4"
uuid "^8.3.2"

"@metamask/message-manager@^8.0.1":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@metamask/message-manager/-/message-manager-8.0.2.tgz#84720f0fe9e0c02cc97b76f0bc8f3d5b0a25f731"
integrity sha512-6o0FRWzmOv5ClYv9QfSJI6LtUJaQokwhVROTV2gLsuoAns8a9NuiHmXZrBh1tdjYifXPoPh74nqim4XBBT+GQQ==
dependencies:
"@metamask/base-controller" "^5.0.2"
"@metamask/controller-utils" "^9.1.0"
"@metamask/eth-sig-util" "^7.0.1"
"@metamask/utils" "^8.3.0"
"@types/uuid" "^8.3.0"
jsonschema "^1.2.4"
uuid "^8.3.2"

"@metamask/message-signing-snap@^0.3.3":
version "0.3.3"
resolved "https://registry.yarnpkg.com/@metamask/message-signing-snap/-/message-signing-snap-0.3.3.tgz#0c37814baa7bb58c2b8bc84caa08b247ba78067b"
Expand Down Expand Up @@ -4647,17 +4670,17 @@
utf-8-validate "^6.0.3"
uuid "^8.3.2"

"@metamask/signature-controller@^13.0.0":
version "13.0.0"
resolved "https://registry.yarnpkg.com/@metamask/signature-controller/-/signature-controller-13.0.0.tgz#17aff5e8bcf707aed33d3ba6ffd616be1b77b100"
integrity sha512-p7dr3wTtoTmQsOtPVNXC0cAUuco9TfCOtsMINvW7nppmeC0c1qRygh3dkPvfUsK4LPzLkZnFIaw6bUrHqGL9Qw==
"@metamask/signature-controller@^14.0.0":
version "14.0.1"
resolved "https://registry.yarnpkg.com/@metamask/signature-controller/-/signature-controller-14.0.1.tgz#3add95d378f7b398f29945b33b0ef4dd3503808e"
integrity sha512-ZBkrpRjo4KYD/bulmDk4MscgKDOGlcLHSXudHTtQRMeg+2HVXGk4ZRyvHohxkT0B4vvex2uVMXk9iyLfc2/Tgg==
dependencies:
"@metamask/approval-controller" "^5.1.3"
"@metamask/base-controller" "^4.1.1"
"@metamask/controller-utils" "^8.0.4"
"@metamask/keyring-controller" "^13.0.0"
"@metamask/logging-controller" "^2.0.3"
"@metamask/message-manager" "^7.3.9"
"@metamask/approval-controller" "^6.0.1"
"@metamask/base-controller" "^5.0.1"
"@metamask/controller-utils" "^9.0.1"
"@metamask/keyring-controller" "^14.0.1"
"@metamask/logging-controller" "^3.0.1"
"@metamask/message-manager" "^8.0.1"
"@metamask/rpc-errors" "^6.2.1"
"@metamask/utils" "^8.3.0"
lodash "^4.17.21"
Expand Down

0 comments on commit 557499a

Please sign in to comment.