Skip to content

Commit f7b5bb1

Browse files
committed
fix: non-chunking support
1 parent 83abea9 commit f7b5bb1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

apps/price_pusher/src/injective/injective.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,13 @@ export class InjectivePricePusher implements IPricePusher {
214214
if (priceIds.length !== pubTimesToPush.length)
215215
throw new Error("Invalid arguments");
216216

217-
const priceIdChunks = splitArrayToChunks({
218-
array: priceIds,
219-
chunkSize: this.chainConfig.priceIdsProcessChunkSize,
220-
});
217+
const priceIdChunks =
218+
this.chainConfig.priceIdsProcessChunkSize === -1
219+
? [priceIds]
220+
: splitArrayToChunks({
221+
array: priceIds,
222+
chunkSize: this.chainConfig.priceIdsProcessChunkSize,
223+
});
221224

222225
for (const [chunkIndex, priceIdChunk] of priceIdChunks.entries()) {
223226
await this.updatePriceFeedChunk(priceIdChunk, chunkIndex);

0 commit comments

Comments
 (0)