@curvefi/llamalend-api 2.0.13 → 2.0.14
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/lib/interfaces.d.ts
CHANGED
|
@@ -222,10 +222,10 @@ export interface IResponseApi {
|
|
|
222
222
|
}
|
|
223
223
|
export interface IQuote {
|
|
224
224
|
outAmount: string;
|
|
225
|
-
priceImpact: number;
|
|
225
|
+
priceImpact: number | null;
|
|
226
226
|
}
|
|
227
227
|
export interface ILeverageMetrics {
|
|
228
|
-
priceImpact: number;
|
|
228
|
+
priceImpact: number | null;
|
|
229
229
|
bands: [number, number];
|
|
230
230
|
prices: string[];
|
|
231
231
|
health: string;
|
|
@@ -624,7 +624,7 @@ export class LeverageZapV2BaseModule {
|
|
|
624
624
|
const health = yield this._leverageRepayHealth(stateCollateral, userCollateral, userBorrowed, quote, healthIsFull, address);
|
|
625
625
|
const _stateCollateral = parseUnits(stateCollateral, this.market.collateral_token.decimals);
|
|
626
626
|
const _userCollateral = parseUnits(userCollateral, this.market.collateral_token.decimals);
|
|
627
|
-
const priceImpact = _stateCollateral + _userCollateral > BigInt(0) ? quote.priceImpact :
|
|
627
|
+
const priceImpact = _stateCollateral + _userCollateral > BigInt(0) ? quote.priceImpact : null;
|
|
628
628
|
return {
|
|
629
629
|
priceImpact,
|
|
630
630
|
bands: [Number(_n2), Number(_n1)],
|
package/package.json
CHANGED
package/src/interfaces.ts
CHANGED
|
@@ -235,11 +235,11 @@ export interface IResponseApi {
|
|
|
235
235
|
|
|
236
236
|
export interface IQuote {
|
|
237
237
|
outAmount: string,
|
|
238
|
-
priceImpact: number
|
|
238
|
+
priceImpact: number | null
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
export interface ILeverageMetrics {
|
|
242
|
-
priceImpact: number,
|
|
242
|
+
priceImpact: number | null,
|
|
243
243
|
bands: [number, number],
|
|
244
244
|
prices: string[],
|
|
245
245
|
health: string,
|
|
@@ -880,7 +880,7 @@ export class LeverageZapV2BaseModule {
|
|
|
880
880
|
|
|
881
881
|
const _stateCollateral = parseUnits(stateCollateral, this.market.collateral_token.decimals);
|
|
882
882
|
const _userCollateral = parseUnits(userCollateral, this.market.collateral_token.decimals);
|
|
883
|
-
const priceImpact = _stateCollateral + _userCollateral > BigInt(0) ? quote.priceImpact :
|
|
883
|
+
const priceImpact = _stateCollateral + _userCollateral > BigInt(0) ? quote.priceImpact : null;
|
|
884
884
|
|
|
885
885
|
return {
|
|
886
886
|
priceImpact,
|