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

chore: upgrade assets-controllers to v38 #12116

Merged
merged 4 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ export class Engine {
networkController.initializeProvider();

const assetsContractController = new AssetsContractController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'AssetsContractController',
allowedActions: [
Expand Down Expand Up @@ -619,8 +618,7 @@ export class Engine {
chainId: networkController.getNetworkClientById(
networkController?.state.selectedNetworkClientId,
).configuration.chainId,
useIPFSSubdomains: false,
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
useIpfsSubdomains: false,
messenger: this.controllerMessenger.getRestricted({
name: 'NftController',
allowedActions: [
Expand Down Expand Up @@ -659,9 +657,9 @@ export class Engine {
chainId: networkController.getNetworkClientById(
networkController?.state.selectedNetworkClientId,
).configuration.chainId,
// @ts-expect-error at this point in time the provider will be defined by the `networkController.initializeProvider`
provider: networkController.getProviderAndBlockTracker().provider,
state: initialState.TokensController,
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'TokensController',
allowedActions: [
Expand All @@ -687,15 +685,13 @@ export class Engine {
AppConstants.NETWORK_STATE_CHANGE_EVENT,
listener,
),
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'TokenListController',
allowedActions: [`${networkController.name}:getNetworkClientById`],
allowedEvents: [`${networkController.name}:stateChange`],
}),
});
const currencyRateController = new CurrencyRateController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'CurrencyRateController',
allowedActions: [`${networkController.name}:getNetworkClientById`],
Expand Down Expand Up @@ -935,7 +931,6 @@ export class Engine {
});

const accountTrackerController = new AccountTrackerController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions
messenger: this.controllerMessenger.getRestricted({
name: 'AccountTrackerController',
allowedActions: [
Expand Down Expand Up @@ -1429,7 +1424,6 @@ export class Engine {
tokensController,
tokenListController,
new TokenDetectionController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'TokenDetectionController',
allowedActions: [
Expand Down Expand Up @@ -1474,7 +1468,6 @@ export class Engine {
}),

new NftDetectionController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'NftDetectionController',
allowedEvents: [
Expand All @@ -1498,7 +1491,6 @@ export class Engine {
phishingController,
preferencesController,
new TokenBalancesController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'TokenBalancesController',
allowedActions: [
Expand All @@ -1515,7 +1507,6 @@ export class Engine {
state: initialState.TokenBalancesController,
}),
new TokenRatesController({
// @ts-expect-error TODO: Resolve mismatch between base-controller versions.
messenger: this.controllerMessenger.getRestricted({
name: 'TokenRatesController',
allowedActions: [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"@metamask/accounts-controller": "^18.2.1",
"@metamask/address-book-controller": "^6.0.1",
"@metamask/approval-controller": "^7.1.0",
"@metamask/assets-controllers": "^37.0.0",
"@metamask/assets-controllers": "^38.3.0",
"@metamask/base-controller": "^7.0.1",
"@metamask/composable-controller": "^3.0.0",
"@metamask/contract-metadata": "^2.1.0",
Expand Down
Loading
Loading