@merkl/api 0.10.197 → 0.10.199
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.
- package/dist/src/modules/v4/campaign/campaign.repository.d.ts +1 -1
 - package/dist/src/modules/v4/campaign/campaign.repository.js +4 -4
 - package/dist/src/modules/v4/reward/reward.service.js +0 -1
 - package/dist/src/modules/v4/status/status.service.js +0 -1
 - package/dist/tsconfig.package.tsbuildinfo +1 -1
 - package/package.json +1 -1
 
| 
         @@ -1,5 +1,5 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import type { CampaignUnique, CreateCampaignModel, GetCampaignQueryModel } from "./";
         
     | 
| 
       2 
     | 
    
         
            -
            import {  
     | 
| 
      
 2 
     | 
    
         
            +
            import { Prisma } from "../../../../database/api/.generated";
         
     | 
| 
       3 
3 
     | 
    
         
             
            import { type ChainId } from "@sdk";
         
     | 
| 
       4 
4 
     | 
    
         
             
            import { type OpportunityMetadata } from "../opportunity";
         
     | 
| 
       5 
5 
     | 
    
         
             
            export declare abstract class CampaignRepository {
         
     | 
| 
         @@ -2,7 +2,7 @@ import { CampaignService } from "./"; 
     | 
|
| 
       2 
2 
     | 
    
         
             
            import { log } from "../../../utils/logger";
         
     | 
| 
       3 
3 
     | 
    
         
             
            import { apiDbClient, engineDbClient } from "../../../utils/prisma";
         
     | 
| 
       4 
4 
     | 
    
         
             
            import { ALL_CAMPAIGNS_FOR_CHAIN_AFTER } from "../../../utils/queries/allCampaigns";
         
     | 
| 
       5 
     | 
    
         
            -
            import { RunStatus, Status } from "../../../../database/api/.generated";
         
     | 
| 
      
 5 
     | 
    
         
            +
            import { Prisma, RunStatus, Status } from "../../../../database/api/.generated";
         
     | 
| 
       6 
6 
     | 
    
         
             
            import { MAX_COMPUTE_JOB_TIME, WEEK } from "@sdk";
         
     | 
| 
       7 
7 
     | 
    
         
             
            import moment from "moment";
         
     | 
| 
       8 
8 
     | 
    
         
             
            import { OpportunityService } from "../opportunity";
         
     | 
| 
         @@ -264,8 +264,8 @@ export class CampaignRepository { 
     | 
|
| 
       264 
264 
     | 
    
         
             
                            startTimestamp: { lte: currentTime }, // The campaign has started
         
     | 
| 
       265 
265 
     | 
    
         
             
                            endTimestamp: { gte: currentTime - WEEK }, // The campaign ended less than a week ago
         
     | 
| 
       266 
266 
     | 
    
         
             
                            params: {
         
     | 
| 
       267 
     | 
    
         
            -
                                path: ["shouldIgnore"], 
     | 
| 
       268 
     | 
    
         
            -
                                 
     | 
| 
      
 267 
     | 
    
         
            +
                                path: ["shouldIgnore"],
         
     | 
| 
      
 268 
     | 
    
         
            +
                                equals: Prisma.AnyNull,
         
     | 
| 
       269 
269 
     | 
    
         
             
                            },
         
     | 
| 
       270 
270 
     | 
    
         
             
                            CampaignStatus: {
         
     | 
| 
       271 
271 
     | 
    
         
             
                                some: {
         
     | 
| 
         @@ -279,7 +279,7 @@ export class CampaignRepository { 
     | 
|
| 
       279 
279 
     | 
    
         
             
                                        {
         
     | 
| 
       280 
280 
     | 
    
         
             
                                            status: RunStatus.PROCESSING,
         
     | 
| 
       281 
281 
     | 
    
         
             
                                            processingStarted: {
         
     | 
| 
       282 
     | 
    
         
            -
                                                lt: currentTime - MAX_COMPUTE_JOB_TIME,
         
     | 
| 
      
 282 
     | 
    
         
            +
                                                lt: currentTime - MAX_COMPUTE_JOB_TIME, // more than 12 hours ago
         
     | 
| 
       283 
283 
     | 
    
         
             
                                            },
         
     | 
| 
       284 
284 
     | 
    
         
             
                                        },
         
     | 
| 
       285 
285 
     | 
    
         
             
                                    ],
         
     | 
| 
         @@ -18,7 +18,6 @@ export class StatusService { 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    return await StatusRepository.findUnique(campaignUnique);
         
     | 
| 
       19 
19 
     | 
    
         
             
                }
         
     | 
| 
       20 
20 
     | 
    
         
             
                static async update(campaignUnique, status) {
         
     | 
| 
       21 
     | 
    
         
            -
                    console.log(campaignUnique, status);
         
     | 
| 
       22 
21 
     | 
    
         
             
                    // Check if the status exists already, otherwise create it
         
     | 
| 
       23 
22 
     | 
    
         
             
                    const campaignExists = await StatusRepository.findUnique(campaignUnique);
         
     | 
| 
       24 
23 
     | 
    
         
             
                    if (!campaignExists) {
         
     |