@scallop-io/sui-scallop-sdk 0.46.67 → 0.46.69

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": "@scallop-io/sui-scallop-sdk",
3
- "version": "0.46.67",
3
+ "version": "0.46.69",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -1,5 +1,6 @@
1
1
  import { normalizeStructTag } from '@mysten/sui.js/utils';
2
2
  import {
3
+ NATIVE_USDC,
3
4
  SUPPORT_BORROW_INCENTIVE_POOLS,
4
5
  SUPPORT_BORROW_INCENTIVE_REWARDS,
5
6
  } from '../constants';
@@ -82,6 +83,7 @@ export const queryBorrowIncentivePools = async (
82
83
  parseOriginBorrowIncentivePoolData(pool);
83
84
 
84
85
  const poolCoinType = normalizeStructTag(pool.pool_type.name);
86
+ if (poolCoinType === NATIVE_USDC) continue;
85
87
  const poolCoinName =
86
88
  query.utils.parseCoinNameFromType<SupportBorrowIncentiveCoins>(
87
89
  poolCoinType
@@ -1,5 +1,5 @@
1
- import { normalizeStructTag } from '@mysten/sui.js/utils';
2
- import { SUPPORT_SPOOLS } from '../constants';
1
+ import { normalizeStructTag, parseStructTag } from '@mysten/sui.js/utils';
2
+ import { NATIVE_USDC, SUPPORT_SPOOLS } from '../constants';
3
3
  import {
4
4
  parseOriginSpoolData,
5
5
  calculateSpoolData,
@@ -165,6 +165,10 @@ export const getSpool = async (
165
165
  lastUpdate: spoolFields.last_update,
166
166
  });
167
167
 
168
+ const underlyingCoinType = parseStructTag(parsedSpoolData.stakeType)
169
+ .typeParams as any as string;
170
+ if (underlyingCoinType === NATIVE_USDC) return undefined;
171
+
168
172
  const marketCoinPrice =
169
173
  (coinPrices?.[coinName] ?? 0) * marketPool.conversionRate;
170
174
  const marketCoinDecimal = query.utils.getCoinDecimal(marketCoinName);