1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00

fix cancel reason event for signatures (#19286)

This commit is contained in:
OGPoyraz 2023-05-25 15:10:45 +02:00 committed by GitHub
parent 9ea6f8ee12
commit 9375e3810f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,16 +1216,19 @@ export default class MetamaskController extends EventEmitter {
this.networkController.store.getState().providerConfig.chainId,
});
this.signatureController.hub.on('cancelWithReason', (message, reason) => {
this.metaMetricsController.trackEvent({
event: reason,
category: MetaMetricsEventCategory.Transactions,
properties: {
action: 'Sign Request',
type: message.type,
},
});
});
this.signatureController.hub.on(
'cancelWithReason',
({ message, reason }) => {
this.metaMetricsController.trackEvent({
event: reason,
category: MetaMetricsEventCategory.Transactions,
properties: {
action: 'Sign Request',
type: message.type,
},
});
},
);
this.swapsController = new SwapsController({
getBufferedGasLimit: this.txController.txGasUtil.getBufferedGasLimit.bind(