@kamino-finance/kliquidity-sdk 7.0.8 → 7.0.9
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/dist/Kamino.d.ts.map +1 -1
- package/dist/Kamino.js +8 -6
- package/dist/Kamino.js.map +1 -1
- package/package.json +1 -1
- package/src/Kamino.ts +7 -9
package/package.json
CHANGED
package/src/Kamino.ts
CHANGED
|
@@ -1449,7 +1449,7 @@ export class Kamino {
|
|
|
1449
1449
|
this.getRaydiumBalances,
|
|
1450
1450
|
collInfos,
|
|
1451
1451
|
scopePricesMap,
|
|
1452
|
-
|
|
1452
|
+
disabledPrices
|
|
1453
1453
|
)
|
|
1454
1454
|
);
|
|
1455
1455
|
|
|
@@ -1461,7 +1461,7 @@ export class Kamino {
|
|
|
1461
1461
|
this.getOrcaBalances,
|
|
1462
1462
|
collInfos,
|
|
1463
1463
|
scopePricesMap,
|
|
1464
|
-
|
|
1464
|
+
disabledPrices
|
|
1465
1465
|
)
|
|
1466
1466
|
);
|
|
1467
1467
|
|
|
@@ -1473,7 +1473,7 @@ export class Kamino {
|
|
|
1473
1473
|
this.getMeteoraBalances,
|
|
1474
1474
|
collInfos,
|
|
1475
1475
|
scopePricesMap,
|
|
1476
|
-
|
|
1476
|
+
disabledPrices
|
|
1477
1477
|
)
|
|
1478
1478
|
);
|
|
1479
1479
|
|
|
@@ -2246,13 +2246,11 @@ export class Kamino {
|
|
|
2246
2246
|
prices = await this._scope.getOraclePrices({ prices: strategy.scopePrices });
|
|
2247
2247
|
}
|
|
2248
2248
|
|
|
2249
|
-
const validTokens = [tokenA, tokenB, rewardToken0, rewardToken1, rewardToken2].filter(
|
|
2250
|
-
(x) => x.mint.equals(PublicKey.default) === false
|
|
2251
|
-
);
|
|
2252
2249
|
let jupPrices: PubkeyHashMap<PublicKey, Decimal> = new PubkeyHashMap();
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2250
|
+
if (disabledTokensPrices) {
|
|
2251
|
+
jupPrices = disabledTokensPrices;
|
|
2252
|
+
} else {
|
|
2253
|
+
jupPrices = await this.getDisabledTokensPrices(collateralInfos);
|
|
2256
2254
|
}
|
|
2257
2255
|
const fallbackTokenAPrice = jupPrices.get(tokenA.mint) ?? new Decimal(0);
|
|
2258
2256
|
const fallbackTokenBPrice = jupPrices.get(tokenB.mint) ?? new Decimal(0);
|