@merkl/api 0.10.301 → 0.10.303

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -313,20 +313,22 @@ export class RewardRepository {
313
313
  const items = _items || 50;
314
314
  const result = await apiDbClient.$queryRawUnsafe(`
315
315
  SELECT
316
+ rb."amount",
317
+ rb."reason",
318
+ rb."claimed",
319
+ rb."pending",
316
320
  r."recipient",
317
- SUM(rb."amount"::numeric)::text AS amount,
318
- SUM(rb."claimed"::numeric)::text AS claimed,
319
- SUM(rb."pending"::numeric)::text AS pending
321
+ r."campaignId",
322
+ r."reason",
323
+ t."address" as "rewardTokenAddress"
320
324
  FROM
321
325
  "RewardBreakdown" rb
322
326
  INNER JOIN
323
327
  "Reward" r ON rb."rewardId" = r."id"
324
328
  WHERE
325
329
  r."root" = $1 AND r."rewardTokenId" = $2
326
- GROUP BY
327
- r."recipient"
328
330
  ORDER BY
329
- (SUM(rb."amount"::numeric) + SUM(rb."pending"::numeric)) DESC
331
+ (rb."amount"::numeric + rb."pending"::numeric) DESC
330
332
  LIMIT $3
331
333
  OFFSET $4
332
334
  `, root, id, items, items * page);