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

[Bug]: Portfolio view: after adding custom network from dapps, the tokens list is updated incorrectly #12638

Closed
Unik0rnMaggie opened this issue Dec 11, 2024 · 3 comments · Fixed by #12641
Assignees
Labels
portfolio-view Used for PRs and issues related to Q4 2024 portfolio view regression-RC-7.38.0 Regression bug that was found in release candidate (RC) for release 7.38.0 release-7.38.0 Issue or pull request that will be included in release 7.38.0 Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking team-assets type-bug Something isn't working

Comments

@Unik0rnMaggie
Copy link
Contributor

Describe the bug

After adding custom network from dapps, the tokens list is updated incorrectly:

  1. In Current network view, after adding the custom network, it shows the tokens from the previously selected network, not the current one
  2. In All Networks view, after adding the custom network, is shows all the tokens, but the networks switcher indicates the current network.

Expected behavior

Show the correct tokens list after adding the custom network

Screenshots/Recordings

Adding.custom.networks.from.dapps.mov

Steps to reproduce

  1. Switch to Current Network view
  2. Go to in-app browser
  3. Connect to Chainlist or any other similar dapp
  4. Add a custom network
  5. Notice the tokens list is showing incorrect tokens
  6. Switch to Current Network view and notice token list updates correctly
  7. Switch to ALL Networks view
  8. Repeat steps 3 and 4
  9. Notice token list is incorrect
  10. Switch to Current Network view and notice token list updates correctly

Error messages or log output

Detection stage

On a feature branch

Version

7.36.0 (1505)

Build type

Other (please specify exactly where you obtained this build in "Additional Context" section)

Device

Pixel 6 Pro

Operating system

Android

Additional context

QA build from here

Severity

No response

@Unik0rnMaggie Unik0rnMaggie added the type-bug Something isn't working label Dec 11, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Dec 11, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Dec 11, 2024
@Unik0rnMaggie Unik0rnMaggie added Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking team-assets portfolio-view Used for PRs and issues related to Q4 2024 portfolio view labels Dec 11, 2024
@Unik0rnMaggie
Copy link
Contributor Author

If the currently enabled network in MetaMask is a default test network (Sepolia or Linea):

After adding a custom network, the message appears: "You don't have any tokens" and the balance is incorrect:

Test.nets.-.adding.custom.network.mov

@sahar-fehri sahar-fehri self-assigned this Dec 11, 2024
github-merge-queue bot pushed a commit that referenced this issue Dec 12, 2024
## **Description**

When a user adds a new network using a dapp; it should display the
correct network filter with the correct tokens display

## **Related issues**

Fixes: #12638

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.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.
@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Dec 12, 2024
@metamaskbot metamaskbot added the release-7.38.0 Issue or pull request that will be included in release 7.38.0 label Dec 12, 2024
@Unik0rnMaggie
Copy link
Contributor Author

Present in v7.38.0 RC from here

When on Current Network view in MetaMask and adding a custom network from a dapp, the token list still shows the tokens from the previously selected network, but the network view button shows the correct network:

Reopening the issue

Add.network.from.dapp.mov

@Unik0rnMaggie Unik0rnMaggie reopened this Dec 13, 2024
@github-project-automation github-project-automation bot moved this from Fixed to To be fixed in Bugs by team Dec 13, 2024
@Unik0rnMaggie Unik0rnMaggie added the regression-RC-7.38.0 Regression bug that was found in release candidate (RC) for release 7.38.0 label Dec 13, 2024
@Unik0rnMaggie
Copy link
Contributor Author

Not present in v7.38.0 (1523) from here

Add.custom.network.token.balance.fixed.mov

Issue will be closed.

@github-project-automation github-project-automation bot moved this from To be fixed to Fixed in Bugs by team Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
portfolio-view Used for PRs and issues related to Q4 2024 portfolio view regression-RC-7.38.0 Regression bug that was found in release candidate (RC) for release 7.38.0 release-7.38.0 Issue or pull request that will be included in release 7.38.0 Sev2-normal An issue that may lead to users misunderstanding some limited risks they are taking team-assets type-bug Something isn't working
Projects
Archived in project
Status: Fixed
Development

Successfully merging a pull request may close this issue.

3 participants