Skip to content

feat: add getSelectedMultichainAccount and listMultichainAccounts - #4330

Merged
montelaidev merged 19 commits into
mainfrom
fix/add-optional-args-to-accounts-controller
May 31, 2024
Merged

feat: add getSelectedMultichainAccount and listMultichainAccounts#4330
montelaidev merged 19 commits into
mainfrom
fix/add-optional-args-to-accounts-controller

Conversation

@montelaidev

@montelaidevmontelaidev commented May 28, 2024

Copy link
Copy Markdown
Contributor

Explanation

This pull request adds two new methods getSelectedMultichainAccount, listMultichainAccounts and selectedEvmAccountChange event. The optional arguments are to make the changes backwards compatible when used with evm specific controllers.

References

Related to:

Changelog

@metamask/accounts-controller

  • : Adds two new methods getSelectedMultichainAccount, listMultichainAccounts, and selectedEvmAccountChange event

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@montelaidev
montelaidev requested a review from a teamMay 28, 2024 14:08
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
gantunesr
gantunesr previously requested changes May 29, 2024
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/utils.ts Outdated

@gantunesrgantunesr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revisit the name of the test to remove the work should? I pointed out a few but there are more from what I saw

Comment threadpackages/accounts-controller/src/AccountsController.test.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.test.ts Outdated
@gantunesr
gantunesr dismissed their stale reviewMay 30, 2024 01:50

Dismissing to unblock

@montelaidevmontelaidev changed the title feat: add optional caip2 arguments to accounts controllerfeat: add getSelectedMultichainAccount and listMultichainAccountsMay 30, 2024
Comment threadpackages/accounts-controller/src/AccountsController.test.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.test.ts
Comment threadpackages/accounts-controller/src/AccountsController.test.ts
Comment threadpackages/accounts-controller/src/AccountsController.test.ts
Comment threadpackages/accounts-controller/src/AccountsController.test.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
@montelaidev
montelaidevforce-pushed the fix/add-optional-args-to-accounts-controller branch from 8d35e9d to db08b3cCompareMay 31, 2024 09:20
Comment threadpackages/accounts-controller/src/tests/mocks.test.ts Outdated
Comment threadpackages/accounts-controller/src/tests/mocks.test.ts Outdated
Comment threadpackages/accounts-controller/src/tests/mocks.test.ts Outdated
Comment threadpackages/accounts-controller/src/tests/mocks.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.ts Outdated
Comment threadpackages/accounts-controller/src/AccountsController.test.ts Outdated
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
@montelaidev
montelaidev merged commit a1297d7 into mainMay 31, 2024
@montelaidev
montelaidev deleted the fix/add-optional-args-to-accounts-controller branch May 31, 2024 09:51
mcmire pushed a commit that referenced this pull request May 31, 2024
)
## Explanation
This pull request adds two new methods `getSelectedMultichainAccount`,
`listMultichainAccounts` and `selectedEvmAccountChange` event. The
optional arguments are to make the changes backwards compatible when
used with evm specific controllers.
## References
Related to:
- [381](MetaMask/accounts-planning#381)
- [419](MetaMask/accounts-planning#419)
## Changelog
### `@metamask/accounts-controller`
- **<CHANGED>**: Adds two new methods `getSelectedMultichainAccount`,
`listMultichainAccounts`, and `selectedEvmAccountChange` event
## Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
---------
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@montelaidev@ccharly@gantunesr