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

feat: Multichain AssetList #28386

Open
wants to merge 214 commits into
base: develop
Choose a base branch
from

Conversation

gambinish
Copy link
Contributor

@gambinish gambinish commented Nov 8, 2024

Description

This PR is currently ready for Alpha version testing. There are still several known issues related to blocking backend dependencies before we can fully merge this into develop. These backend dependencies enable cross chain polling, and are being included via NPM as a preview build until an official core release gets cut. For instance, one of these dependencies is: MetaMask/core#4782

Additionally, there are integration changes that need to be made on the client. Some of these changes are incorporated into this PR, such as #28276 which integrates cross chain balance polling with it's corresponding core PR.

Once these dependent PRs get merged, the diff in this PR should theoretically become much smaller.

Known issues:

  1. marketData is not prepopulated across chains. In order to see all of your tokens, on your first app load, you may need to first switch between all of your added networks so that the marketData from each network gets loaded into state.
  2. Aggregated balances are not yet aggregated across chains. This is currently in progress.
  3. There may be some bugs with the default selected currency setting
  4. e2e tests. Existing tests need to be expanded to account for new multi-chain feature.

Open in GitHub Codespaces

Related 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:

  1. Load up a wallet in Metamask that has several accounts, with several networks added to each account. Each account should have tokens for each network. If you are loading this branch locally, you can run this with the following feature flag: yarn && FILTER_TOKENS_TOGGLE=1 yarn webpack --watch
  2. When "All Networks" are selected, you should see all your tokens across networks
  3. You can toggle to the current network, which should filter your tokens for that specific network
  4. Assets should correctly navigate to their details page (global network selector should remain unchanged)
  5. Sending/Swapping tokens from the AssetDetails page, from a different network that the globally selected network, should switch networks to the one of the token to be sent, before navigating the user to the send/swap screens. A toast message should inform the user that the network has been changed on their behalf.
  6. When on the AssetList, switching networks should also update the token list to the tokens on the selected account
  7. Importing tokens should update the AssetList with the tokens from the chain they are being imported on.
  8. Token sorting should be respected by both included sort criteria

Screenshots/Recordings

Screen.Recording.2024-11-11.at.4.15.34.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.

gambinish and others added 30 commits October 11, 2024 10:03
…om:MetaMask/metamask-extension into feat/mmassets-432_network-filter-extension
…om:MetaMask/metamask-extension into feat/mmassets-432_network-filter-extension
@gambinish gambinish requested a review from a team as a code owner November 14, 2024 00:07
@gambinish gambinish removed the request for review from a team November 14, 2024 00:20
github-merge-queue bot pushed a commit that referenced this pull request Nov 14, 2024
## **Description**

This PR introduces some non-breaking patterns from
#28386

The idea is to introduce this as a smaller PR to reduce the diff in
#28386 to make it
easier to review

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28429?quickstart=1)

## **Related issues**

Fixes: N/A

## **Manual testing steps**

App should be fully functional with no regressions

## **Screenshots/Recordings**

## **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: chloeYue <[email protected]>
Co-authored-by: seaona <[email protected]>
Co-authored-by: Monte Lai <[email protected]>
Co-authored-by: Charly Chevalier <[email protected]>
Co-authored-by: Pedro Figueiredo <[email protected]>
Base automatically changed from feat/mmassets-432_network-filter-extension--prep-updates to develop November 14, 2024 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs dev review
Development

Successfully merging this pull request may close these issues.

10 participants