-
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
feat: Multichain AssetList
#28386
feat: Multichain AssetList
#28386
Conversation
…g custom filter logic
…om:MetaMask/metamask-extension into feat/mmassets-432_network-filter-extension
…om:MetaMask/metamask-extension into feat/mmassets-432_network-filter-extension
…ask-extension into brian/asset-controller-39
…n--integration-balances
…n--integration-balances
## **Description** Cherry picks design updates for `AssetListControlBar` introduced from #28386 separately in it's own PR to help minimize diff in main feature branch. Also includes unit test and e2e updates impacted from these changes. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28575?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** Run with feature flag and without feature flag: `yarn webpack --watch` `PORTFOLIO_VIEW=1 yarn webpack --watch` Validate that sort works, validate that import works, validate that refresh list works. ## **Screenshots/Recordings** Without feature flag: https://github.com/user-attachments/assets/445d4fd1-93d1-4cee-bd7b-bcc36518d7ca With feature flag (network filter not yet integrated) https://github.com/user-attachments/assets/d1aa8812-9787-49b5-9696-39e56d82ed56 ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. --------- Co-authored-by: Jonathan Bursztyn <[email protected]>
* @param {object} state - Redux state | ||
* @returns {object} An object of tokens with balances for the given account. Data relationship will be chainId => balance | ||
*/ | ||
export function getSelectedAccountNativeTokenCachedBalanceByChainId(state) { |
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.
We need to add tests for these selectors.
…n--integration-balances
useEffect(() => { | ||
const testnetChains: string[] = TEST_CHAINS; | ||
const mainnetChainIds = Object.keys(allNetworks).filter( | ||
(chain) => !testnetChains.includes(chain), | ||
); | ||
setChainsToShow(mainnetChainIds); | ||
}, []); | ||
|
||
const allOpts: Record<string, boolean> = {}; | ||
Object.keys(allNetworks).forEach((chain) => { | ||
allOpts[chain] = true; | ||
}); |
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.
I think that we should refactor this logic into a hook. It's being used in multiple places, and should just use the getChainIdsToPoll
selector.
I would prefer to address this cleanup in a separate PR, if possible.
closing in favor of #28593 |
Description
This PR is currently ready for QA testing.
Once these dependent PRs get merged, the diff in this PR should theoretically become much smaller.
Known issues:
AssetList
unit tests #28451AssetList
e2e tests #28524Related issues
Fixes: https://github.com/orgs/MetaMask/projects/85/views/35?pane=issue&itemId=82217837
Manual testing steps
These are the happy paths we are currently ready to start QA:
yarn && PORTFOLIO_VIEW=1 yarn webpack --watch
Screenshots/Recordings
Screen.Recording.2024-11-11.at.4.15.34.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist