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

Controller selector example #4447

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jun 21, 2024

Explanation

An example of some controller selectors, as per https://github.com/MetaMask/decisions/pull/32

References

Changelog

N/A

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

Copy link

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

Package New capabilities Transitives Size Publisher
npm/reselect@5.1.1 None 0 646 kB acemarke

View full report↗︎

* @param chainId - The chain ID for the chain you want the most recent selected account for.
* @returns The most recently selected account, or undefined.
*/
export const selectLastSelectedChainAccount = createSelector(
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps it would be useful to add some example tests for selectors as well, although I would expect them to be very simple

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.

2 participants