Skip to content

Commit

Permalink
feat: upgrade assets controllers to version 33 (#25484)
Browse files Browse the repository at this point in the history
## **Description**

Upgrades assets controllers from version 30 to 33. See the package's
[changelog](https://github.com/MetaMask/core/blob/main/packages/assets-controllers/CHANGELOG.md)
for details.

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

## **Related issues**


## **Manual testing steps**

Test token detection, token prices, NFT detection

## **Screenshots/Recordings**

No visible differences

### **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/develop/.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/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: MetaMask Bot <[email protected]>
  • Loading branch information
bergeron and metamaskbot authored Jun 27, 2024
1 parent d403213 commit c5d6593
Show file tree
Hide file tree
Showing 12 changed files with 332 additions and 583 deletions.

This file was deleted.

13 changes: 0 additions & 13 deletions .yarn/patches/@metamask-assets-controllers-patch-26d4328777.patch

This file was deleted.

251 changes: 0 additions & 251 deletions .yarn/patches/@metamask-assets-controllers-patch-a3b39b55a6.patch

This file was deleted.

9 changes: 0 additions & 9 deletions app/scripts/metamask-controller.actions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,6 @@ describe('MetaMaskController', function () {
const decimals = 18;

it('two parallel calls with same token details give same result', async function () {
const supportsInterfaceStub = jest.fn().mockResolvedValue(false);
jest
.spyOn(metamaskController.tokensController, '_createEthersContract')
.mockResolvedValue({ supportsInterface: supportsInterfaceStub });

const [token1, token2] = await Promise.all([
metamaskController.getApi().addToken({ address, symbol, decimals }),
metamaskController.getApi().addToken({ address, symbol, decimals }),
Expand All @@ -235,10 +230,6 @@ describe('MetaMaskController', function () {
});

it('networkClientId is used when provided', async function () {
const supportsInterfaceStub = jest.fn().mockResolvedValue(false);
jest
.spyOn(metamaskController.tokensController, '_createEthersContract')
.mockResolvedValue({ supportsInterface: supportsInterfaceStub });
const callSpy = jest
.spyOn(metamaskController.controllerMessenger, 'call')
.mockReturnValue({ configuration: { chainId: '0xa' } });
Expand Down
Loading

0 comments on commit c5d6593

Please sign in to comment.