@defisaver/positions-sdk 2.0.15-dev-4 → 2.0.15-dev-5

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.
@@ -68,12 +68,19 @@ const getIncentiveApys = (baseData, compPrice) => __awaiter(void 0, void 0, void
68
68
  description: `Native ${baseData.symbol} yield.`,
69
69
  }),
70
70
  ],
71
- borrowIncentives: [Object.assign({ token: 'COMP', apy: (0, moneymarket_1.aprToApy)((100 * constants_1.SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(), incentiveKind: common_1.IncentiveKind.Reward, description: 'Eligible for protocol-level COMP incentives.' }, (0, utils_1.addToArrayIf)(staking_1.STAKING_ASSETS.includes(baseData.symbol), {
71
+ borrowIncentives: [{
72
+ token: 'COMP',
73
+ apy: (0, moneymarket_1.aprToApy)((100 * constants_1.SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
74
+ incentiveKind: common_1.IncentiveKind.Reward,
75
+ description: 'Eligible for protocol-level COMP incentives.',
76
+ },
77
+ ...(0, utils_1.addToArrayIf)(staking_1.STAKING_ASSETS.includes(baseData.symbol), {
72
78
  apy: new decimal_js_1.default(yield (0, staking_1.getStakingApy)(baseData.symbol)).mul(-1).toString(),
73
79
  token: baseData.symbol,
74
80
  incentiveKind: common_1.IncentiveKind.Staking,
75
- description: `Native ${baseData.symbol} yield.`,
76
- }))],
81
+ description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
82
+ }),
83
+ ],
77
84
  });
78
85
  });
79
86
  exports.getIncentiveApys = getIncentiveApys;
@@ -60,12 +60,19 @@ export const getIncentiveApys = (baseData, compPrice) => __awaiter(void 0, void
60
60
  description: `Native ${baseData.symbol} yield.`,
61
61
  }),
62
62
  ],
63
- borrowIncentives: [Object.assign({ token: 'COMP', apy: aprToApy((100 * SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(), incentiveKind: IncentiveKind.Reward, description: 'Eligible for protocol-level COMP incentives.' }, addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
63
+ borrowIncentives: [{
64
+ token: 'COMP',
65
+ apy: aprToApy((100 * SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
66
+ incentiveKind: IncentiveKind.Reward,
67
+ description: 'Eligible for protocol-level COMP incentives.',
68
+ },
69
+ ...addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
64
70
  apy: new Dec(yield getStakingApy(baseData.symbol)).mul(-1).toString(),
65
71
  token: baseData.symbol,
66
72
  incentiveKind: IncentiveKind.Staking,
67
- description: `Native ${baseData.symbol} yield.`,
68
- }))],
73
+ description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
74
+ }),
75
+ ],
69
76
  });
70
77
  });
71
78
  export const getCompoundV2AggregatedData = (_a) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.0.15-dev-4",
3
+ "version": "2.0.15-dev-5",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -105,13 +105,14 @@ export const getIncentiveApys = async (
105
105
  apy: aprToApy((100 * SECONDS_PER_YEAR * +baseData.rewardBorrowSpeed * +compPrice) / +baseData.price / +baseData.totalBorrow).toString(),
106
106
  incentiveKind: IncentiveKind.Reward,
107
107
  description: 'Eligible for protocol-level COMP incentives.',
108
- ...addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
109
- apy: new Dec(await getStakingApy(baseData.symbol)).mul(-1).toString(),
110
- token: baseData.symbol,
111
- incentiveKind: IncentiveKind.Staking,
112
- description: `Native ${baseData.symbol} yield.`,
113
- }),
114
- }],
108
+ },
109
+ ...addToArrayIf(STAKING_ASSETS.includes(baseData.symbol), {
110
+ apy: new Dec(await getStakingApy(baseData.symbol)).mul(-1).toString(),
111
+ token: baseData.symbol,
112
+ incentiveKind: IncentiveKind.Staking,
113
+ description: `Due to the native yield of ${baseData.symbol}, the value of the debt would increase over time.`,
114
+ }),
115
+ ],
115
116
  });
116
117
 
117
118
  export const getCompoundV2AggregatedData = ({