From 5783166040dd3c2e5348b5cf9abfa8327832136b Mon Sep 17 00:00:00 2001 From: vgorkavenko Date: Tue, 19 Nov 2024 18:33:36 +0700 Subject: [PATCH] fix: use `assign` instead of `merge` because of overriding with `undefined` --- src/duty/summary/summary.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/duty/summary/summary.service.ts b/src/duty/summary/summary.service.ts index 1d95d631..ff491cd5 100644 --- a/src/duty/summary/summary.service.ts +++ b/src/duty/summary/summary.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@nestjs/common'; -import { merge } from 'lodash'; +import { assignIn, merge } from 'lodash'; import { ValStatus } from 'common/consensus-provider'; import { Epoch } from 'common/consensus-provider/types'; @@ -98,7 +98,7 @@ export class SummaryService { }, set: (val: ValidatorDutySummary) => { const curr = epochStorageData.summary.get(val.val_id) ?? {}; - epochStorageData.summary.set(val.val_id, merge(curr, val)); + epochStorageData.summary.set(val.val_id, assignIn(curr, val)); }, get: (val_id: ValidatorId): ValidatorDutySummary => { return epochStorageData.summary.get(val_id);