diff --git a/app/scripts/controllers/transactions/lib/tx-state-history-helper.js b/app/scripts/controllers/transactions/lib/tx-state-history-helper.js index ef085afd9..bc12a9f03 100644 --- a/app/scripts/controllers/transactions/lib/tx-state-history-helper.js +++ b/app/scripts/controllers/transactions/lib/tx-state-history-helper.js @@ -62,13 +62,12 @@ function replayHistory (_shortHistory) { } /** - @param {Object} txMeta - @returns {Object} - a clone object of the txMeta with out history -*/ + * Snapshot {@code txMeta} + * @param {Object} txMeta - the tx metadata object + * @returns {Object} a deep clone without history + */ function snapshotFromTxMeta (txMeta) { - // create txMeta snapshot for history - const snapshot = cloneDeep(txMeta) - // dont include previous history in this snapshot - delete snapshot.history - return snapshot + const shallow = { ...txMeta } + delete shallow.history + return cloneDeep(shallow) }