@merkl/api 0.20.11 → 0.20.13
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.
@@ -582,7 +582,7 @@ export class ClammDynamicData {
|
|
582
582
|
/** Clear alm APRs */
|
583
583
|
const distributionForwarders = almDetails.map(x => ({ ...x }));
|
584
584
|
let priceRewardToken = 0;
|
585
|
-
if (c.campaignParameters.symbolRewardToken !== "aglaMerkl") {
|
585
|
+
if (isLive && c.campaignParameters.symbolRewardToken !== "aglaMerkl") {
|
586
586
|
// priceRewardToken = (await pricer.get({
|
587
587
|
// address: c.rewardToken,
|
588
588
|
// chainId: chainId,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { ProtocolId } from "@/modules/v4/protocol/protocol.model";
|
2
|
-
import { type Campaign as CampaignEnum, type CampaignParameters,
|
2
|
+
import { type Campaign as CampaignEnum, type CampaignParameters, ChainId } from "@sdk";
|
3
3
|
import type { BigNumberish } from "ethers";
|
4
4
|
import type { MetadataBuilder } from "../interface";
|
5
5
|
type campaignType = CampaignEnum.MORPHO;
|
@@ -15,7 +15,7 @@ export declare class MorphoMetadata implements MetadataBuilder<campaignType> {
|
|
15
15
|
depositUrl: string | undefined;
|
16
16
|
explorerAddress: `0x${string}`;
|
17
17
|
}>;
|
18
|
-
static generateUrl(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"],
|
18
|
+
static generateUrl(computeChainId: ChainId, params: CampaignParameters<campaignType>["campaignParameters"], _morphoParams: {
|
19
19
|
nameTargetToken: string;
|
20
20
|
symbolLoanToken: string;
|
21
21
|
symbolBorrowToken: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { OpportunityAction } from "@db/api";
|
2
|
-
import { BN2Number, MorphoSubCampaignType, NETWORK_LABELS, } from "@sdk";
|
2
|
+
import { BN2Number, ChainId, MorphoSubCampaignType, NETWORK_LABELS, } from "@sdk";
|
3
3
|
import { getAddress } from "viem";
|
4
4
|
export class MorphoMetadata {
|
5
5
|
async build(computeChainId, params, subType) {
|
@@ -16,15 +16,15 @@ export class MorphoMetadata {
|
|
16
16
|
action: subtype.action,
|
17
17
|
tokens: [{ chainId: computeChainId, address: params.targetToken }],
|
18
18
|
name: subtype.name,
|
19
|
-
mainProtocol: "morpho",
|
19
|
+
mainProtocol: (computeChainId === ChainId.POLYGON ? "compound" : "morpho"),
|
20
20
|
depositUrl: MorphoMetadata.generateUrl(computeChainId, params, morphoParams, subType),
|
21
21
|
explorerAddress: getAddress(params.targetToken),
|
22
22
|
};
|
23
23
|
}
|
24
|
-
static generateUrl(computeChainId, params,
|
24
|
+
static generateUrl(computeChainId, params, _morphoParams, subType) {
|
25
25
|
switch (subType) {
|
26
26
|
case MorphoSubCampaignType.META: {
|
27
|
-
if (
|
27
|
+
if (computeChainId === ChainId.POLYGON) {
|
28
28
|
return `https://www.compound.blue/${params.targetToken?.toLowerCase()}`;
|
29
29
|
}
|
30
30
|
return `https://app.morpho.org/vault?vault=${params.targetToken}&network=${NETWORK_LABELS[computeChainId]?.toLowerCase()}`;
|