mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
Fix missing property on snap export metric (#20685)
This commit is contained in:
parent
ebae98d301
commit
01786ad199
@ -1790,14 +1790,16 @@ export default class MetamaskController extends EventEmitter {
|
||||
/**
|
||||
* Tracks snaps export usage. Note: This function is throttled to 1 call per 60 seconds.
|
||||
*
|
||||
* @param {string} snapId - The ID of the snap the handler is being triggered on.
|
||||
* @param {string} handler - The handler to trigger on the snap for the request.
|
||||
*/
|
||||
_trackSnapExportUsage = throttle(
|
||||
(handler) =>
|
||||
(snapId, handler) =>
|
||||
this.metaMetricsController.trackEvent({
|
||||
event: MetaMetricsEventName.SnapExportUsed,
|
||||
category: MetaMetricsEventCategory.Snaps,
|
||||
properties: {
|
||||
snap_id: snapId,
|
||||
export: handler,
|
||||
},
|
||||
}),
|
||||
@ -1815,7 +1817,7 @@ export default class MetamaskController extends EventEmitter {
|
||||
* @returns The result of the JSON-RPC request.
|
||||
*/
|
||||
handleSnapRequest(args) {
|
||||
this._trackSnapExportUsage(args.handler);
|
||||
this._trackSnapExportUsage(args.snapId, args.handler);
|
||||
|
||||
return this.controllerMessenger.call('SnapController:handleRequest', args);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user