mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
[FLASK] Add snap update metrics (#15206)
* added snap update metrics * fixed update event
This commit is contained in:
parent
be47d78475
commit
e280204287
@ -1291,6 +1291,21 @@ export default class MetamaskController extends EventEmitter {
|
||||
},
|
||||
);
|
||||
|
||||
this.controllerMessenger.subscribe(
|
||||
`${this.snapController.name}:snapUpdated`,
|
||||
(newSnap, oldVersion) => {
|
||||
this.metaMetricsController.trackEvent({
|
||||
event: 'Snap Updated',
|
||||
category: EVENT.CATEGORIES.SNAPS,
|
||||
properties: {
|
||||
snap_id: newSnap.id,
|
||||
old_version: oldVersion,
|
||||
new_version: newSnap.version,
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
this.controllerMessenger.subscribe(
|
||||
`${this.snapController.name}:snapTerminated`,
|
||||
(truncatedSnap) => {
|
||||
|
Loading…
Reference in New Issue
Block a user