diff --git a/packages/api/src/routes/avs/avsController.ts b/packages/api/src/routes/avs/avsController.ts index eb1efb74..960e9cb6 100644 --- a/packages/api/src/routes/avs/avsController.ts +++ b/packages/api/src/routes/avs/avsController.ts @@ -528,12 +528,6 @@ export async function getAVSRewards(req: Request, res: Response) { } }) - if (!rewardsSubmissions || rewardsSubmissions.length === 0) { - throw new Error('AVS not found.') - } - - const tokenPrices = await fetchTokenPrices() - const result: { address: string submissions: Submission[] @@ -550,6 +544,11 @@ export async function getAVSRewards(req: Request, res: Response) { rewardStrategies: [] } + if (!rewardsSubmissions || rewardsSubmissions.length === 0) { + return res.send(result) + } + + const tokenPrices = await fetchTokenPrices() const rewardTokens: string[] = [] const rewardStrategies: string[] = [] let currentSubmission: Submission | null = null