[FLASK] Add snap update metrics (#15206)

* added snap update metrics

* fixed update event
feature/default_network_editable
Hassan Malik 2 years ago committed by GitHub
parent be47d78475
commit e280204287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      app/scripts/metamask-controller.js

@ -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…
Cancel
Save