diff --git a/app/scripts/controllers/metametrics-controller.ts b/app/scripts/controllers/metametrics-controller.ts index e286a3a47d02..f82d79d66680 100644 --- a/app/scripts/controllers/metametrics-controller.ts +++ b/app/scripts/controllers/metametrics-controller.ts @@ -1,4 +1,5 @@ import { + cloneDeep, isEqual, memoize, merge, @@ -584,7 +585,8 @@ export default class MetaMetricsController extends BaseController< : {}; this.update((state) => { - state.fragments[id] = merge(additionalFragmentProps, fragment); + // We're cloning "additionalFragmentProps" because it can contain a frozen piece of Immer state + state.fragments[id] = merge(cloneDeep(additionalFragmentProps), fragment); }); if (fragment.initialEvent) {