Skip to content

Commit

Permalink
chore: upgrade assets controllers v32.0.0 (#11687)
Browse files Browse the repository at this point in the history
## **Description**

PR to upgrade assets-controllers to v32


## **Related issues**

Fixes:

## **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] -->


https://github.com/user-attachments/assets/0bc5e970-f069-4838-89c5-ca4dfdc71826



https://github.com/user-attachments/assets/7b6d9987-a57b-48d8-9e6c-97cf882120e2




## **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.
  • Loading branch information
sahar-fehri authored Oct 14, 2024
1 parent 094c578 commit 7863f59
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 461 deletions.
5 changes: 0 additions & 5 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ class Engine {
chainId: networkController.getNetworkClientById(
networkController?.state.selectedNetworkClientId,
).configuration.chainId,
// @ts-expect-error TODO: Resolve bump the assets controller version.
getNetworkClientById:
networkController.getNetworkClientById.bind(networkController),
});
Expand Down Expand Up @@ -654,7 +653,6 @@ class Engine {
networkController?.state.selectedNetworkClientId,
).configuration.chainId,
selectedAddress: preferencesController.state.selectedAddress,
// @ts-expect-error TODO: Resolve provider type mismatch
provider: networkController.getProviderAndBlockTracker().provider,
state: initialState.TokensController,
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
Expand Down Expand Up @@ -953,7 +951,6 @@ class Engine {
networkController?.state.selectedNetworkClientId,
).configuration.chainId,
),
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
getNetworkClientById:
networkController.getNetworkClientById.bind(networkController),
});
Expand Down Expand Up @@ -1529,7 +1526,6 @@ class Engine {
selectedAddress: preferencesController.state.selectedAddress,
tokenPricesService: codefiTokenApiV2,
interval: 30 * 60 * 1000,
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
getNetworkClientById:
networkController.getNetworkClientById.bind(networkController),
}),
Expand Down Expand Up @@ -1780,7 +1776,6 @@ class Engine {
}
provider.sendAsync = provider.sendAsync.bind(provider);
AccountTrackerController.configure({ provider });
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
AssetsContractController.configure({ provider });

SwapsController.configure({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"@metamask/accounts-controller": "^18.2.1",
"@metamask/address-book-controller": "^6.0.1",
"@metamask/approval-controller": "^7.0.1",
"@metamask/assets-controllers": "^31.0.0",
"@metamask/assets-controllers": "^32.0.0",
"@metamask/base-controller": "^7.0.1",
"@metamask/composable-controller": "^3.0.0",
"@metamask/contract-metadata": "^2.1.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/types/PreferencesController.d.ts b/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/types/PreferencesController.d.ts
index ddf6eb4..e8dac6d 100644
--- a/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/types/PreferencesController.d.ts
+++ b/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/types/PreferencesController.d.ts
diff --git a/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts b/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
index 04a9d6f..391652d 100644
--- a/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
+++ b/node_modules/@metamask/assets-controllers/node_modules/@metamask/preferences-controller/dist/PreferencesController.d.cts
@@ -65,7 +65,7 @@ export type PreferencesState = {
/**
* Controls whether the OpenSea API is used
Expand Down
Loading

0 comments on commit 7863f59

Please sign in to comment.