From e7dc42be0b2ef8fc199021720a6c1acf3f6d8433 Mon Sep 17 00:00:00 2001 From: ryanml Date: Mon, 16 Aug 2021 17:28:56 -0700 Subject: [PATCH] Do not attempt to track tx metrics events if txMeta is not available (#11823) --- app/scripts/controllers/transactions/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index 5a1d72611..5fe5cc4e6 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -1383,6 +1383,10 @@ export default class TransactionController extends EventEmitter { * @param {Object} extraParams - optional props and values to include in sensitiveProperties */ _trackTransactionMetricsEvent(txMeta, event, extraParams = {}) { + if (!txMeta) { + return; + } + const { type, time,