diff --git a/packages/bitcore-node/src/providers/chain-state/external/streams/apiStream.ts b/packages/bitcore-node/src/providers/chain-state/external/streams/apiStream.ts index 9b80646ebd5..e64e341489b 100644 --- a/packages/bitcore-node/src/providers/chain-state/external/streams/apiStream.ts +++ b/packages/bitcore-node/src/providers/chain-state/external/streams/apiStream.ts @@ -1,6 +1,6 @@ import axios from 'axios'; import { Request, Response } from 'express'; -import { Readable, Stream, Writable } from 'stream'; +import { Readable, Stream, Transform, Writable } from 'stream'; export class ExternalApiStream extends Readable { url: string; @@ -145,4 +145,14 @@ export class ExternalApiStream extends Readable { }); }; } +} + +export class MergedStream extends Transform { + constructor() { + super({ objectMode: true }); + } + + async _transform(data: any, _, done) { + done(null, data); + } } \ No newline at end of file