@merkl/api 0.10.232 → 0.10.234
Sign up to get free protection for your applications and to get access to all the features.
@@ -54,6 +54,7 @@ export class CampaignRepository {
|
|
54
54
|
throw new Error(`unable to fetch data for token ${campaign.rewardTokenAddress}`);
|
55
55
|
}
|
56
56
|
tokens = tokens.filter(t => t !== undefined);
|
57
|
+
const params = JSON.parse(campaign.params);
|
57
58
|
const opportunityId = OpportunityService.hashId({
|
58
59
|
chainId: campaign.computeChainId,
|
59
60
|
identifier: campaign.opportunityIdentifier,
|
@@ -69,7 +70,7 @@ export class CampaignRepository {
|
|
69
70
|
amount: campaign.amount,
|
70
71
|
campaignId: campaign.campaignId,
|
71
72
|
endTimestamp: BigInt(campaign.endTimestamp),
|
72
|
-
params
|
73
|
+
params,
|
73
74
|
startTimestamp: BigInt(campaign.startTimestamp),
|
74
75
|
type: campaignType,
|
75
76
|
ComputeChain: {
|
@@ -104,6 +105,7 @@ export class CampaignRepository {
|
|
104
105
|
MainProtocol: {
|
105
106
|
connect: metadata.mainProtocol && { id: metadata.mainProtocol },
|
106
107
|
},
|
108
|
+
depositUrl: !!params.url ? params.url : undefined,
|
107
109
|
},
|
108
110
|
},
|
109
111
|
},
|
@@ -24,14 +24,19 @@ export class ProtocolRepository {
|
|
24
24
|
where: {
|
25
25
|
id: query.id ? { contains: query.id, mode: "insensitive" } : undefined,
|
26
26
|
tags: query.tags ? { hasEvery: query.tags } : undefined,
|
27
|
-
|
28
|
-
?
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
OR: query.opportunityTag // The opportunity tag specified can be either at the protocol level or the opportunity level
|
28
|
+
? [
|
29
|
+
{
|
30
|
+
MainOpportunities: {
|
31
|
+
some: {
|
32
|
+
tags: {
|
33
|
+
has: query.opportunityTag,
|
34
|
+
},
|
35
|
+
},
|
32
36
|
},
|
33
37
|
},
|
34
|
-
|
38
|
+
{ tags: { has: query.opportunityTag } },
|
39
|
+
]
|
35
40
|
: undefined,
|
36
41
|
// id: typeof query.id === "string" ? query.id : !!query.id ? { in: query.id } : undefined,
|
37
42
|
},
|