From 3a3f04090c027c12b0076f57b9efc4d923d42dae Mon Sep 17 00:00:00 2001 From: Theo Butler Date: Thu, 29 Feb 2024 09:58:30 -0500 Subject: [PATCH] fmt --- packages/indexer-service/src/allocations.ts | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/indexer-service/src/allocations.ts b/packages/indexer-service/src/allocations.ts index b58e4a59e..737df59dc 100644 --- a/packages/indexer-service/src/allocations.ts +++ b/packages/indexer-service/src/allocations.ts @@ -97,7 +97,8 @@ export const monitorEligibleAllocations = ({ { indexer: indexer.toLowerCase(), lastId, - }) + }, + ) if (result.error) { throw result.error @@ -105,7 +106,7 @@ export const monitorEligibleAllocations = ({ if (result.data.length == 0) { break } - activeAllocations.push(result.data.allocations); + activeAllocations.push(result.data.allocations) lastId = result.data.allocations.slice(-1)[0].id } @@ -147,7 +148,8 @@ export const monitorEligibleAllocations = ({ indexer: indexer.toLowerCase(), lastId, closedAtEpochThreshold: currentEpoch - 1, // allocation can be closed within the last epoch or later - }) + }, + ) if (result.error) { throw result.error @@ -155,24 +157,18 @@ export const monitorEligibleAllocations = ({ if (result.data.length == 0) { break } - recentlyClosedAllocations.push(result.data.allocations); + recentlyClosedAllocations.push(result.data.allocations) lastId = result.data.allocations.slice(-1)[0].id } - const allocations = [ - ...activeAllocations, - ...recentlyClosedAllocations, - ] + const allocations = [...activeAllocations, ...recentlyClosedAllocations] if (allocations.length == 0) { throw new Error(`No data / indexer not found on chain`) } // eslint-disable-next-line @typescript-eslint/no-explicit-any - return [ - ...activeAllocations, - ...recentlyClosedAllocations, - ].map(x => parseGraphQLAllocation(x, protocolNetwork)) + return allocations.map(x => parseGraphQLAllocation(x, protocolNetwork)) } catch (err) { logger.warn(`Failed to query indexer allocations, keeping existing`, { allocations: currentAllocations.map(allocation => allocation.id),