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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

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/[email protected] 🔁 npm/@metamask/[email protected] None 0 289 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 144 kB danfinlay, gudahtt, kumavis, ...6 more
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None +1 488 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 948 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 544 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 35.7 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 66.2 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 119 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 54.8 kB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 1.52 MB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 1.39 MB metamaskbot
npm/@metamask/[email protected] 🔁 npm/@metamask/[email protected] None 0 2.21 MB metamaskbot
npm/@noble/[email protected] 🔁 npm/@noble/[email protected], npm/@noble/[email protected] None 0 1.5 MB paulmillr
npm/@scure/[email protected] 🔁 npm/@scure/[email protected] None 0 133 kB paulmillr
npm/@scure/[email protected] 🔁 npm/@scure/[email protected] None 0 58.7 kB paulmillr
npm/@scure/[email protected] 🔁 npm/@scure/[email protected] None 0 374 kB paulmillr
npm/[email protected] 🔁 npm/[email protected] 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 force-pushed the chore/accounts-controller-23 branch from e8df17a to 0e35bd9 Compare February 13, 2025 20:18
@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: 0e35bd9
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2a151230-6709-453b-b6cf-9e7c5f59ae48

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run Smoke E2E Triggers smoke e2e on Bitrise team-accounts
Projects
Status: Review finalised - Ready to be merged
5 participants