@merkl/api 0.19.41 → 0.19.43

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-8468905cbe3c71008929e6c9c29775ccac921661cf57388037e54f0117d7ef9f",
2
+ "name": "prisma-client-e55b57e665b20db5d493b89451fe31b7c3979a20e6f7ef5974be604f6174e619",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -299,7 +299,7 @@ model Reward {
299
299
  model RewardBreakdown {
300
300
  id Int @id @default(autoincrement())
301
301
  stringId String @default("")
302
- uuid String @default(dbgenerated("gen_random_uuid()")) @db.Uuid
302
+ uuid String? @default(dbgenerated("gen_random_uuid()")) @db.Uuid
303
303
  Protocol Protocol? @relation(fields: [protocolId], references: [id])
304
304
  protocolId String?
305
305
  reason String
@@ -1 +1 @@
1
- export declare const main: () => Promise<never>;
1
+ export declare const main: () => Promise<void>;
@@ -2,7 +2,6 @@
2
2
  if (!process.env.DATABASE_API_URL || !process.env.ENV || !process.env.CHAIN_ID || !process.env.ROOT)
3
3
  throw new Error("[ENV]: missing variable");
4
4
  import { BucketService } from "@/modules/v4/bucket/bucket.service";
5
- import { RewardService } from "@/modules/v4/reward";
6
5
  import { log } from "@/utils/logger";
7
6
  import { apiDbClient } from "@db";
8
7
  import { S3Client } from "bun";
@@ -65,7 +64,7 @@ const transform = (rewardBreakdowns) => {
65
64
  const rewardTokenId = Bun.hash(`${process.env.CHAIN_ID}${rewardBreakdowns[i].token}`).toString();
66
65
  const rewardId = Bun.hash(`${process.env.ROOT}${rewardBreakdowns[i].recipient}${rewardTokenId}`).toString();
67
66
  const campaignId = Bun.hash(`${process.env.CHAIN_ID}${rewardBreakdowns[i].campaignId}`).toString();
68
- const rewardBreakdownId = RewardService.hashBreakdownId(rewardId, campaignId, rewardBreakdowns[i].reason);
67
+ const rewardBreakdownId = Bun.hash(`${rewardId}${campaignId}${rewardBreakdowns[i].reason}`).toString();
69
68
  transformedBreakdowns[i] = {
70
69
  stringId: rewardBreakdownId,
71
70
  rewardId,
@@ -151,5 +150,4 @@ export const main = async () => {
151
150
  }
152
151
  }
153
152
  // if (failedBatches.length === 0) await file.delete();
154
- process.exit(0);
155
153
  };
@@ -79,7 +79,7 @@ export declare abstract class RewardRepository {
79
79
  pending: string;
80
80
  id: number;
81
81
  reason: string;
82
- uuid: string;
82
+ uuid: string | null;
83
83
  campaignId: string;
84
84
  amount: string;
85
85
  stringId: string;
@@ -106,7 +106,7 @@ export declare abstract class RewardRepository {
106
106
  pending: string;
107
107
  id: number;
108
108
  reason: string;
109
- uuid: string;
109
+ uuid: string | null;
110
110
  campaignId: string;
111
111
  amount: string;
112
112
  stringId: string;
@@ -405,7 +405,7 @@ export declare abstract class RewardService {
405
405
  pending: string;
406
406
  id: number;
407
407
  reason: string;
408
- uuid: string;
408
+ uuid: string | null;
409
409
  campaignId: string;
410
410
  amount: string;
411
411
  stringId: string;
@@ -708,7 +708,7 @@ export declare abstract class RewardService {
708
708
  pending: string;
709
709
  id: number;
710
710
  reason: string;
711
- uuid: string;
711
+ uuid: string | null;
712
712
  campaignId: string;
713
713
  amount: string;
714
714
  stringId: string;