@defisaver/positions-sdk 2.0.15-dev-2 → 2.0.15-dev-3

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.
@@ -172,11 +172,11 @@ const calculateNetApy = ({ usedAssets, assetsData, }) => {
172
172
  if (eligibilityCheck) {
173
173
  const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets);
174
174
  const incentiveInterest = isEligible ? (0, exports.calculateInterestEarned)(eligibleUSDAmount, apy, 'year', true) : '0';
175
- acc.incentiveUsd = new decimal_js_1.default(acc.incentiveUsd).sub(incentiveInterest).toString();
175
+ acc.incentiveUsd = new decimal_js_1.default(acc.incentiveUsd).add(incentiveInterest).toString();
176
176
  }
177
177
  else {
178
178
  const incentiveInterest = (0, exports.calculateInterestEarned)(amount, apy, 'year', true);
179
- acc.incentiveUsd = new decimal_js_1.default(acc.incentiveUsd).sub(incentiveInterest).toString();
179
+ acc.incentiveUsd = new decimal_js_1.default(acc.incentiveUsd).add(incentiveInterest).toString();
180
180
  }
181
181
  }
182
182
  }
@@ -165,11 +165,11 @@ export const calculateNetApy = ({ usedAssets, assetsData, }) => {
165
165
  if (eligibilityCheck) {
166
166
  const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets);
167
167
  const incentiveInterest = isEligible ? calculateInterestEarned(eligibleUSDAmount, apy, 'year', true) : '0';
168
- acc.incentiveUsd = new Dec(acc.incentiveUsd).sub(incentiveInterest).toString();
168
+ acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
169
169
  }
170
170
  else {
171
171
  const incentiveInterest = calculateInterestEarned(amount, apy, 'year', true);
172
- acc.incentiveUsd = new Dec(acc.incentiveUsd).sub(incentiveInterest).toString();
172
+ acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
173
173
  }
174
174
  }
175
175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/positions-sdk",
3
- "version": "2.0.15-dev-2",
3
+ "version": "2.0.15-dev-3",
4
4
  "description": "",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
@@ -145,10 +145,10 @@ export const calculateNetApy = ({
145
145
  if (eligibilityCheck) {
146
146
  const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets);
147
147
  const incentiveInterest = isEligible ? calculateInterestEarned(eligibleUSDAmount, apy, 'year', true) : '0';
148
- acc.incentiveUsd = new Dec(acc.incentiveUsd).sub(incentiveInterest).toString();
148
+ acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
149
149
  } else {
150
150
  const incentiveInterest = calculateInterestEarned(amount, apy, 'year', true);
151
- acc.incentiveUsd = new Dec(acc.incentiveUsd).sub(incentiveInterest).toString();
151
+ acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
152
152
  }
153
153
  }
154
154
  }