1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +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,7 +1216,9 @@ 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(
'cancelWithReason',
({ message, reason }) => {
this.metaMetricsController.trackEvent({ this.metaMetricsController.trackEvent({
event: reason, event: reason,
category: MetaMetricsEventCategory.Transactions, category: MetaMetricsEventCategory.Transactions,
@ -1225,7 +1227,8 @@ export default class MetamaskController extends EventEmitter {
type: message.type, type: message.type,
}, },
}); });
}); },
);
this.swapsController = new SwapsController({ this.swapsController = new SwapsController({
getBufferedGasLimit: this.txController.txGasUtil.getBufferedGasLimit.bind( getBufferedGasLimit: this.txController.txGasUtil.getBufferedGasLimit.bind(