-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Refactor token selectors #8671
Refactor token selectors #8671
Conversation
Unused token selectors have been removed, and the remaining token selector has been moved to the `metamask` Redux store.
88fcfdb
to
49066f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is ducks
the right place for getTokens
?
Edit: More generally, where are our selectors going to live?
Builds ready [49066f3]
Page Load Metrics (611 ± 53 ms)
|
I would like selectors to live alongside the Redux stores they select from, as in the new alert stores. Co-locating the selectors with the store itself encapsulates knowledge of the state shape to this single module. Ideally all of our stores would behave this way: self-contained state-machines that control their own state (except the Selectors will likely still have to exist in other places as well, to perform post-processing specific to certain areas of the UI, or to combine data from different stores, but those can be built up from the store selectors without them needing to understand the internal store structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* origin/develop: (689 commits) Implement asset page (#8696) fix crash on signature request (#8709) Fix accounts menu styling (#8707) Delete docs/porting_to_new_environment.md (#8704) Remove unused `getToErrorObject` parameters (#8705) hide connected-status on metamask ext (#8703) Stop adding permissions middleware to trusted connections (#8701) Use `send` state for send flow token (#8695) do not display extension id in connection modal (#8699) Fix tab content disappearing during scrolling on macOS Firefox (#8702) close details when button is pressed (#8694) Refactor token selectors (#8671) Update eth_accounts permission description (#8693) Extract selected token from token input (#8692) Fix propType for Home defaultHomeActiveTabName (#8683) Fix create account form styling (#8689) Remove unused `getSelectedTokenAssetImage` selector (#8691) Remove `getTxParams` (#8676) do not show account mismatch alert on details (#8678) Fix connect hardware styling (#8680) ...
Unused token selectors have been removed, and the remaining token selector has been moved to the
metamask
Redux store.