Skip to content

[Bug]: Following a network switch, the token list does not update accordingly #29260

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

Closed
sleepytanya opened this issue Dec 17, 2024 · 0 comments · Fixed by #29943
Closed

[Bug]: Following a network switch, the token list does not update accordingly #29260

sleepytanya opened this issue Dec 17, 2024 · 0 comments · Fixed by #29943
Labels
needs-triage Issue needs to be triaged regression-RC-12.10.0 Regression bug that was found in release candidate (RC) for release 12.10.0 release-12.12.0 Issue or pull request that will be included in release 12.12.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-assets type-bug Something isn't working

Comments

@sleepytanya
Copy link
Contributor

Describe the bug

There are instances where, following a network switch, the token list does not update accordingly, leading to a mismatch between the network icon and the token icons displayed. Additionally, during such occurrences, the 'Current Network' view automatically switches to the 'Popular Networks' view.

Expected behavior

Tokens updated accordingly, network view selector doesn't switch automaically.

Screenshots/Recordings

tokens1.mov
tokens3.mov
Image

Steps to reproduce

  1. Switch between 'Current network' and 'Popular networks' view and between networks

Error messages or log output

Detection stage

During release testing

Version

v12.10.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

@sleepytanya sleepytanya added needs-triage Issue needs to be triaged regression-RC-12.10.0 Regression bug that was found in release candidate (RC) for release 12.10.0 team-assets team-wallet-ux type-bug Something isn't working labels Dec 17, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by severity Dec 17, 2024
@sleepytanya sleepytanya added the Sev2-normal Normal severity; minor loss of service or inconvenience. label Dec 17, 2024
@github-project-automation github-project-automation bot moved this to To be fixed in Bugs by team Dec 19, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 29, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

The issue occurred because switching networks from the RPC selector,
which is only available when there's a network with at least 2 RPCs, was
not performing the same actions as switching networks from clicking the
network list item directly.

I have created a handler for the actions that need to be performed and
passed it down to both the network list item and the rpc selector modal,
that way it ensures that the same actions occur.

A test has been added to the rpc modal to validate the new handler is
being called. Tests already exist in the network list to validate that
those actions are taking place, and they are still passing.

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

## **Related issues**

Fixes: #29260

## **Manual testing steps**

1. Ensure at least one of your networks has more than one RPC, so that
the RPC selector appears.
2. Set any network and, in the Tokens tab, select "Current network" as
the option.
3. Open the network selector and select another network by clicking in
the rpc url, which will open an rpc selector modal.
4. Select any of the RPCs and check that the tokens from the new network
appear and that "Current network" is still

## **Screenshots/Recordings**

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

### **Before**

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


https://github.com/user-attachments/assets/3ac163d3-4f2e-4170-81f4-f3b4ccc8e3d3



### **After**

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


https://github.com/user-attachments/assets/7dc02f85-42e0-449e-a419-cc74fc936de7



## **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/main/.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/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 Jan 29, 2025
@metamaskbot metamaskbot added the release-12.12.0 Issue or pull request that will be included in release 12.12.0 label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Issue needs to be triaged regression-RC-12.10.0 Regression bug that was found in release candidate (RC) for release 12.10.0 release-12.12.0 Issue or pull request that will be included in release 12.12.0 Sev2-normal Normal severity; minor loss of service or inconvenience. team-assets type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants
@hesterbruikman @metamaskbot @sleepytanya and others