diff --git a/packages/node-core/CHANGELOG.md b/packages/node-core/CHANGELOG.md index 2a63ac8084..67aa0a23f6 100644 --- a/packages/node-core/CHANGELOG.md +++ b/packages/node-core/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Issues with using object destructing for store interface and workers (#2094) ## [6.0.1] - 2023-10-12 ### Fixed diff --git a/packages/node-core/src/indexer/worker/worker.store.service.ts b/packages/node-core/src/indexer/worker/worker.store.service.ts index eff999e8c6..f774b8aae9 100644 --- a/packages/node-core/src/indexer/worker/worker.store.service.ts +++ b/packages/node-core/src/indexer/worker/worker.store.service.ts @@ -3,6 +3,7 @@ import * as util from 'util'; import {Store, FieldsExpression} from '@subql/types-core'; +import {instanceToPlain} from 'class-transformer'; /** * Proxy objects aren't serializable between worker threads. @@ -14,7 +15,7 @@ function unwrapProxy(input: T): T { return input; } - return {...input}; + return instanceToPlain(input) as T; } /* Unwraps any arguments to a function that are proxy objects */