1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01: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.networkController.store.getState().providerConfig.chainId,
}); });
this.signatureController.hub.on('cancelWithReason', (message, reason) => { this.signatureController.hub.on(
this.metaMetricsController.trackEvent({ 'cancelWithReason',
event: reason, ({ message, reason }) => {
category: MetaMetricsEventCategory.Transactions, this.metaMetricsController.trackEvent({
properties: { event: reason,
action: 'Sign Request', category: MetaMetricsEventCategory.Transactions,
type: message.type, properties: {
}, action: 'Sign Request',
}); type: message.type,
}); },
});
},
);
this.swapsController = new SwapsController({ this.swapsController = new SwapsController({
getBufferedGasLimit: this.txController.txGasUtil.getBufferedGasLimit.bind( getBufferedGasLimit: this.txController.txGasUtil.getBufferedGasLimit.bind(