mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Update the announcement controller to v2 (#18465)
The announcement controller has been updated to v2.0.1. The breaking change in v2 was the migration to the BaseControllerV2 API. This affected the constructor, as well as some methods/properties that we do not use.
This commit is contained in:
parent
54fa7808c1
commit
92556867f7
@ -548,10 +548,14 @@ export default class MetamaskController extends EventEmitter {
|
||||
this.phishingController.setStalelistRefreshInterval(30 * SECOND);
|
||||
}
|
||||
|
||||
this.announcementController = new AnnouncementController(
|
||||
{ allAnnouncements: UI_NOTIFICATIONS },
|
||||
initState.AnnouncementController,
|
||||
);
|
||||
const announcementMessenger = this.controllerMessenger.getRestricted({
|
||||
name: 'AnnouncementController',
|
||||
});
|
||||
this.announcementController = new AnnouncementController({
|
||||
messenger: announcementMessenger,
|
||||
allAnnouncements: UI_NOTIFICATIONS,
|
||||
state: initState.AnnouncementController,
|
||||
});
|
||||
|
||||
// token exchange rate tracker
|
||||
this.tokenRatesController = new TokenRatesController(
|
||||
|
@ -686,18 +686,10 @@
|
||||
},
|
||||
"@metamask/announcement-controller": {
|
||||
"packages": {
|
||||
"@metamask/announcement-controller>@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/announcement-controller>@metamask/base-controller": {
|
||||
"packages": {
|
||||
"immer": true
|
||||
"@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/approval-controller": {
|
||||
"globals": {
|
||||
"console.log": true
|
||||
},
|
||||
"packages": {
|
||||
"@metamask/approval-controller>nanoid": true,
|
||||
"@metamask/base-controller": true,
|
||||
|
@ -686,18 +686,10 @@
|
||||
},
|
||||
"@metamask/announcement-controller": {
|
||||
"packages": {
|
||||
"@metamask/announcement-controller>@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/announcement-controller>@metamask/base-controller": {
|
||||
"packages": {
|
||||
"immer": true
|
||||
"@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/approval-controller": {
|
||||
"globals": {
|
||||
"console.log": true
|
||||
},
|
||||
"packages": {
|
||||
"@metamask/approval-controller>nanoid": true,
|
||||
"@metamask/base-controller": true,
|
||||
|
@ -686,18 +686,10 @@
|
||||
},
|
||||
"@metamask/announcement-controller": {
|
||||
"packages": {
|
||||
"@metamask/announcement-controller>@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/announcement-controller>@metamask/base-controller": {
|
||||
"packages": {
|
||||
"immer": true
|
||||
"@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/approval-controller": {
|
||||
"globals": {
|
||||
"console.log": true
|
||||
},
|
||||
"packages": {
|
||||
"@metamask/approval-controller>nanoid": true,
|
||||
"@metamask/base-controller": true,
|
||||
|
@ -686,18 +686,10 @@
|
||||
},
|
||||
"@metamask/announcement-controller": {
|
||||
"packages": {
|
||||
"@metamask/announcement-controller>@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/announcement-controller>@metamask/base-controller": {
|
||||
"packages": {
|
||||
"immer": true
|
||||
"@metamask/base-controller": true
|
||||
}
|
||||
},
|
||||
"@metamask/approval-controller": {
|
||||
"globals": {
|
||||
"console.log": true
|
||||
},
|
||||
"packages": {
|
||||
"@metamask/approval-controller>nanoid": true,
|
||||
"@metamask/base-controller": true,
|
||||
|
@ -227,7 +227,7 @@
|
||||
"@lavamoat/snow": "^1.5.0",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@metamask/address-book-controller": "^1.0.0",
|
||||
"@metamask/announcement-controller": "^1.0.0",
|
||||
"@metamask/announcement-controller": "^2.0.1",
|
||||
"@metamask/approval-controller": "^1.0.0",
|
||||
"@metamask/assets-controllers": "^4.0.1",
|
||||
"@metamask/base-controller": "^1.0.0",
|
||||
|
12
yarn.lock
12
yarn.lock
@ -3586,12 +3586,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@metamask/announcement-controller@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@metamask/announcement-controller@npm:1.0.0"
|
||||
"@metamask/announcement-controller@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "@metamask/announcement-controller@npm:2.0.1"
|
||||
dependencies:
|
||||
"@metamask/base-controller": ~1.0.0
|
||||
checksum: 013c370484bf38d724e1ac5988043bc9b14391908f1ffe02b2b68e15c4ee65ce84d3622f510c830112bb742c69adea213547aeb858d079d626a081bbc2bb664f
|
||||
"@metamask/base-controller": ^1.1.2
|
||||
checksum: 170db513315dc81f131fc38a560a6d8959c4af9111a26c4f263847ab41cf2520a6dc4c77cfe40d8566ca4e87c3fe85a67def9e5499e9ccd02678792f4a8b9e56
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -24277,7 +24277,7 @@ __metadata:
|
||||
"@lavamoat/snow": ^1.5.0
|
||||
"@material-ui/core": ^4.11.0
|
||||
"@metamask/address-book-controller": ^1.0.0
|
||||
"@metamask/announcement-controller": ^1.0.0
|
||||
"@metamask/announcement-controller": ^2.0.1
|
||||
"@metamask/approval-controller": ^1.0.0
|
||||
"@metamask/assets-controllers": ^4.0.1
|
||||
"@metamask/auto-changelog": ^2.1.0
|
||||
|
Loading…
Reference in New Issue
Block a user