@scallop-io/sui-scallop-sdk 1.4.11 → 1.4.13

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.
@@ -14,7 +14,7 @@ export declare const SUPPORT_SCOIN: readonly ["susdc", "ssbeth", "ssui", "swusdc
14
14
  export declare const SUPPORT_SUI_BRIDGE: readonly ["sbeth"];
15
15
  export declare const SUPPORT_WORMHOLE: readonly ["wusdc", "wusdt", "weth", "wbtc", "wapt", "wsol"];
16
16
  export declare const SUPPORT_SPOOLS_REWARDS: readonly ["sui"];
17
- export declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["sui", "wusdc", "wusdt", "afsui", "hasui", "vsui", "weth", "sbeth", "sca", "usdc"];
17
+ export declare const SUPPORT_BORROW_INCENTIVE_POOLS: readonly ["usdc", "sbeth", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fud", "deep"];
18
18
  export declare const SUPPORT_BORROW_INCENTIVE_REWARDS: readonly ["usdc", "sbeth", "weth", "wbtc", "wusdc", "wusdt", "sui", "wapt", "wsol", "cetus", "afsui", "hasui", "vsui", "sca", "fud", "deep", "susdc", "ssbeth", "ssui", "swusdc", "swusdt", "safsui", "shasui", "svsui", "sweth", "ssca", "scetus", "swsol", "swbtc", "sdeep", "sfud"];
19
19
  export declare const SUPPORT_ORACLES: readonly ["supra", "switchboard", "pyth"];
20
20
  export declare const SUPPORT_PACKAGES: readonly ["coinDecimalsRegistry", "math", "whitelist", "x", "protocol", "protocolWhitelist", "query", "supra", "pyth", "switchboard", "xOracle", "testCoin"];
package/dist/index.js CHANGED
@@ -206,18 +206,7 @@ var SUPPORT_WORMHOLE = [
206
206
  "wsol"
207
207
  ];
208
208
  var SUPPORT_SPOOLS_REWARDS = ["sui"];
209
- var SUPPORT_BORROW_INCENTIVE_POOLS = [
210
- "sui",
211
- "wusdc",
212
- "wusdt",
213
- "afsui",
214
- "hasui",
215
- "vsui",
216
- "weth",
217
- "sbeth",
218
- "sca",
219
- "usdc"
220
- ];
209
+ var SUPPORT_BORROW_INCENTIVE_POOLS = [...SUPPORT_POOLS];
221
210
  var SUPPORT_BORROW_INCENTIVE_REWARDS = [
222
211
  ...SUPPORT_POOLS,
223
212
  ...SUPPORT_SCOIN
@@ -3800,12 +3789,15 @@ var getObligationAccounts = async (query, ownerAddress, indexer = false) => {
3800
3789
  return obligationAccounts;
3801
3790
  };
3802
3791
  var getObligationAccount = async (query, obligationId, ownerAddress, indexer = false, market, coinPrices, coinAmounts) => {
3792
+ const coinNames = Array.from(
3793
+ /* @__PURE__ */ new Set([...SUPPORT_POOLS, ...SUPPORT_COLLATERALS])
3794
+ );
3803
3795
  const collateralAssetCoinNames = [
3804
3796
  ...SUPPORT_COLLATERALS
3805
3797
  ];
3806
3798
  market = market ?? await query.queryMarket({ indexer });
3807
3799
  coinPrices = coinPrices ?? await query.getAllCoinPrices({ marketPools: market.pools });
3808
- coinAmounts = coinAmounts || await query.getCoinAmounts(collateralAssetCoinNames, ownerAddress);
3800
+ coinAmounts = coinAmounts || await query.getCoinAmounts(coinNames, ownerAddress);
3809
3801
  const [obligationQuery, borrowIncentivePools, borrowIncentiveAccounts] = await Promise.all([
3810
3802
  query.queryObligation(obligationId),
3811
3803
  query.getBorrowIncentivePools(void 0, {