Skip to content

token-rates - protect against bad token data#5659

Merged
kumavis merged 1 commit into
developfrom
token-rates-bugfix
Nov 4, 2018
Merged

token-rates - protect against bad token data#5659
kumavis merged 1 commit into
developfrom
token-rates-bugfix

Conversation

@kumavis

@kumavis kumavis commented Nov 3, 2018

Copy link
Copy Markdown
Contributor

Fixes #5541

@metamaskbot

Copy link
Copy Markdown
Collaborator
Builds ready [2c1bca1]: mascara, chrome, firefox, edge, opera

@kumavis kumavis merged commit 1485266 into develop Nov 4, 2018
@kumavis kumavis deleted the token-rates-bugfix branch November 4, 2018 01:57
erdimaden pushed a commit that referenced this pull request May 1, 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**

This update upgrades the asset controllers to version 60, which
introduces important changes to the `TokensController`:

- Refactored `TokensController` to eliminate reliance on a single
selected network ([#5659](MetaMask/core#5659)).
- `TokensController` methods now require `networkClientId` to be
explicitly passed as a parameter.
- Token management logic is now fully parameterized by `chainId`,
enabling multi-chain token handling and improving reliability across
network changes.
- Internal state updates and token metadata fetching are now scoped to
the appropriate `chainId`.

<!--
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?
-->

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

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to MM
2. Test add tokens , hide tokens, and other flows

## **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
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/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-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.

---------

Co-authored-by: sahar-fehri <sahar.fehri@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants