@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kamino-finance/kliquidity-sdk",
3
- "version": "7.0.8",
3
+ "version": "7.0.9",
4
4
  "description": "Typescript SDK for interacting with the Kamino Liquidity (kliquidity) protocol",
5
5
  "repository": {
6
6
  "type": "git",
package/src/Kamino.ts CHANGED
@@ -1449,7 +1449,7 @@ export class Kamino {
1449
1449
  this.getRaydiumBalances,
1450
1450
  collInfos,
1451
1451
  scopePricesMap,
1452
- disabledTokensPrices
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
- disabledTokensPrices
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
- disabledTokensPrices
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
- if (!disabledTokensPrices) {
2255
- jupPrices = await JupService.getDollarPrices(validTokens.map((x) => x.mint));
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);