Skip to content
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

chore: Update accounts controller to v23 and related packages (transaction controller etc) #13436

Merged
merged 20 commits into from
Feb 13, 2025

Conversation

owencraston
Copy link
Contributor

@owencraston owencraston commented Feb 11, 2025

Description

This PR updates the AccountsController and the TransactionController. These are the two major updates however there are a few smaller peer dep updates as well. Here is a description of the changes...

"@metamask/accounts-controller": "^21.0.0" -> 23.1.0"

"@metamask/transaction-controller": "^43.0.0" -> 45.1.0

  • changelog
  • Breaking changes:
    • BREAKING: Bump @metamask/accounts-controller peer dependency from ^22.0.0 to ^23.0.0

"@metamask/keyring-api": "^13.0.0" -> 17.0.0

"@metamask/keyring-internal-api": "^2.0.0" -> 4.0.2

  • changelog
  • Breaking changes
    • BREAKING: Bump @metamask/keyring-api from ^14.0.0 to ^15.0.0 (release: 23.0.0 accounts#160) The scopes from each AccountStruct types is now more strict which impact all InternalAccountStruct types.
    • BREAKING: Bump @metamask/keyring-api from ^15.0.0 to ^16.0.0 (release: 24.0.0 accounts#172)
      The scopes from each AccountStruct types is now more strict (remove support of CAIP-2 namespaces) which impact all InternalAccountStruct types.
  • Bump @metamask/keyring-api from ^16.1.0 to ^17.0.0 (release: 26.0.0 accounts#192)

"@metamask/eth-snap-keyring": "^7.1.0" -> 10.0.0

"@metamask/snaps-sdk": "^6.13.0" -> 6.17.1

"@metamask/snaps-utils": "^8.6.1" -> ^8.10.0

Related issues

Fixes: #13374
Fixes: #13377

Manual testing steps

Testing snap accounts

  1. ensure you are building metamask flask by setting the value of METAMASK_BUILD_TYPE to flask in your .js.env
  2. source .js.env
  3. yarn setup
  4. yarn start:ios
  5. create/import a wallet
  6. click on the selected account at the top of the home page
  7. click on the Add account button
  8. then click the Add Solana account (Beta) button
  9. a popup with a suggested name should appeaer
  10. click OK, the account should now be added to your account list. if you have a balance on this address then it should show in the portfolio view.
  11. repeat the above steps with the Bitcoin and Bitcoin testnet account

Testing transactions

  1. ensure you are NOT building flask by setting the value of METAMASK_BUILD_TYPE to main in your .js.env
  2. source .js.env
  3. yarn setup
  4. yarn start:ios
  5. import an account that has funds
  6. click on the selected account at the top of the screen and the account list should open
  7. then click on the add account button, then click add account
  8. a new eth account should appear in your wallet
  9. click on main bottom tab navigator icon which should open a list of actions, select Send.
  10. the Send flow should open.
  11. set your from account to the account that has funds and the to account to your newly created account.
  12. type in a valid amount then go through the rest of the send flow
  13. in the end the transaction should go through.
  14. the account balances on the home page should be updated

Screenshots/Recordings

Before

After

On-boarding and Account Creation Flow

Screen.Recording.2025-02-12.at.9.11.39.PM.mov

Send flow

Screen.Recording.2025-02-12.at.9.30.18.PM.mov

Pre-merge author checklist

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.

Copy link
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.

Copy link

socket-security bot commented Feb 11, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/accounts-controller@23.1.0 🔁 npm/@metamask/accounts-controller@21.0.0 None 0 289 kB metamaskbot
npm/@metamask/eth-sig-util@8.2.0 🔁 npm/@metamask/eth-sig-util@8.1.2 None 0 144 kB danfinlay, gudahtt, kumavis, ...6 more
npm/@metamask/eth-snap-keyring@10.0.0 🔁 npm/@metamask/eth-snap-keyring@8.0.0 None +1 488 kB metamaskbot
npm/@metamask/key-tree@10.0.2 🔁 npm/@metamask/key-tree@10.0.1 None 0 948 kB metamaskbot
npm/@metamask/keyring-api@17.0.0 🔁 npm/@metamask/keyring-api@13.0.0 None 0 544 kB metamaskbot
npm/@metamask/keyring-internal-snap-client@4.0.0 🔁 npm/@metamask/keyring-internal-snap-client@2.0.0 None 0 35.7 kB metamaskbot
npm/@metamask/keyring-snap-client@4.0.0 🔁 npm/@metamask/keyring-snap-client@2.0.0 None 0 66.2 kB metamaskbot
npm/@metamask/keyring-utils@2.1.0 🔁 npm/@metamask/keyring-utils@1.0.0 None 0 119 kB metamaskbot
npm/@metamask/snaps-registry@3.2.3 🔁 npm/@metamask/snaps-registry@3.2.2 None 0 54.8 kB metamaskbot
npm/@metamask/snaps-sdk@6.17.1 🔁 npm/@metamask/snaps-sdk@6.13.0 None +1 1.64 MB metamaskbot
npm/@metamask/snaps-utils@8.10.0 🔁 npm/@metamask/snaps-utils@8.6.1 None 0 1.39 MB metamaskbot
npm/@metamask/transaction-controller@45.1.0 🔁 npm/@metamask/transaction-controller@43.0.0 None +2 3.63 MB metamaskbot
npm/@noble/curves@1.4.2 🔁 npm/@noble/curves@1.3.0, npm/@noble/curves@1.4.0 None 0 1.5 MB paulmillr
npm/@scure/base@1.1.9 🔁 npm/@scure/base@1.1.6 None 0 133 kB paulmillr
npm/@scure/bip32@1.4.0 🔁 npm/@scure/bip32@1.3.3 None 0 58.7 kB paulmillr
npm/@scure/bip39@1.3.0 🔁 npm/@scure/bip39@1.2.2 None 0 374 kB paulmillr
npm/ethereum-cryptography@2.2.1 🔁 npm/ethereum-cryptography@2.1.3 None 0 83.7 kB paulmillr

View full report↗︎

@owencraston owencraston force-pushed the chore/accounts-controller-23 branch 2 times, most recently from f787633 to e1a6c36 Compare February 12, 2025 01:48
@owencraston owencraston force-pushed the chore/accounts-controller-23 branch 2 times, most recently from 48a5ca2 to 4292b49 Compare February 12, 2025 20:23
@owencraston owencraston added the Run Smoke E2E Triggers smoke e2e on Bitrise label Feb 13, 2025
Copy link
Contributor

github-actions bot commented Feb 13, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0b6e757
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/7c2fda5e-d7b1-4151-8212-0fb2ee86a5f6

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@owencraston owencraston changed the title chore: Update accounts controller to v23 and related packages (transaction controller) chore: Update accounts controller to v23 and related packages (transaction controller etc) Feb 13, 2025
@owencraston owencraston marked this pull request as ready for review February 13, 2025 05:46
@owencraston owencraston requested review from a team as code owners February 13, 2025 05:46
app/store/migrations/066.test.ts Outdated Show resolved Hide resolved
app/store/migrations/066.ts Show resolved Hide resolved
app/store/migrations/066.ts Show resolved Hide resolved
app/store/migrations/066.ts Outdated Show resolved Hide resolved
app/store/migrations/067.test.ts Show resolved Hide resolved
app/store/migrations/067.test.ts Outdated Show resolved Hide resolved
@owencraston owencraston force-pushed the chore/accounts-controller-23 branch 2 times, most recently from 2667656 to b04ed3b Compare February 13, 2025 17:16
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 13, 2025
Copy link
Contributor

github-actions bot commented Feb 13, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 0cb9202
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4b8c4af0-549c-4a00-9f07-b6c7a8231ed9

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 13, 2025
Copy link
Contributor

https://bitrise.io/ Bitrise

🔄🔄🔄 pr_smoke_e2e_pipeline started on Bitrise...🔄🔄🔄

Commit hash: d5e19ab
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/39101d34-04bf-463a-bedf-6ecfd3a9a530

Note

  • This comment will auto-update when build completes
  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.83%. Comparing base (351a276) to head (d121b01).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13436   +/-   ##
=======================================
  Coverage   61.83%   61.83%           
=======================================
  Files        1975     1977    +2     
  Lines       43847    43854    +7     
  Branches     5926     5928    +2     
=======================================
+ Hits        27111    27118    +7     
  Misses      14935    14935           
  Partials     1801     1801           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 13, 2025
Copy link
Contributor

github-actions bot commented Feb 13, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: d121b01
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9e662c0f-d1f2-4cff-b813-4efdc2722236

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

tommasini
tommasini previously approved these changes Feb 13, 2025
@owencraston owencraston dismissed stale reviews from tommasini and gantunesr via 2502053 February 13, 2025 20:38
@owencraston owencraston force-pushed the chore/accounts-controller-23 branch from 0e35bd9 to 2502053 Compare February 13, 2025 20:38
@owencraston owencraston added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Feb 13, 2025
Copy link
Contributor

github-actions bot commented Feb 13, 2025

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 2502053
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/84cc143a-10c0-4c15-b64a-fe843e250236

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@owencraston
Copy link
Contributor Author

I've noticed e2e failures on main since yesterday.

@owencraston owencraston added this pull request to the merge queue Feb 13, 2025
Merged via the queue into main with commit 42263b2 Feb 13, 2025
42 of 43 checks passed
@owencraston owencraston deleted the chore/accounts-controller-23 branch February 13, 2025 21:20
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2025
@metamaskbot metamaskbot added the release-7.42.0 Issue or pull request that will be included in release 7.42.0 label Feb 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-7.42.0 Issue or pull request that will be included in release 7.42.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts
Projects
Archived in project
6 participants