@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.
- package/dist/constants/common.d.ts +1 -1
- package/dist/index.js +5 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -13
- package/dist/index.mjs.map +1 -1
- package/dist/models/scallopQuery.d.ts +12 -0
- package/dist/queries/borrowIncentiveQuery.d.ts +12 -0
- package/package.json +1 -1
- package/src/constants/common.ts +1 -12
- package/src/queries/portfolioQuery.ts +8 -4
package/dist/index.mjs
CHANGED
|
@@ -114,18 +114,7 @@ var SUPPORT_WORMHOLE = [
|
|
|
114
114
|
"wsol"
|
|
115
115
|
];
|
|
116
116
|
var SUPPORT_SPOOLS_REWARDS = ["sui"];
|
|
117
|
-
var SUPPORT_BORROW_INCENTIVE_POOLS = [
|
|
118
|
-
"sui",
|
|
119
|
-
"wusdc",
|
|
120
|
-
"wusdt",
|
|
121
|
-
"afsui",
|
|
122
|
-
"hasui",
|
|
123
|
-
"vsui",
|
|
124
|
-
"weth",
|
|
125
|
-
"sbeth",
|
|
126
|
-
"sca",
|
|
127
|
-
"usdc"
|
|
128
|
-
];
|
|
117
|
+
var SUPPORT_BORROW_INCENTIVE_POOLS = [...SUPPORT_POOLS];
|
|
129
118
|
var SUPPORT_BORROW_INCENTIVE_REWARDS = [
|
|
130
119
|
...SUPPORT_POOLS,
|
|
131
120
|
...SUPPORT_SCOIN
|
|
@@ -3711,12 +3700,15 @@ var getObligationAccounts = async (query, ownerAddress, indexer = false) => {
|
|
|
3711
3700
|
return obligationAccounts;
|
|
3712
3701
|
};
|
|
3713
3702
|
var getObligationAccount = async (query, obligationId, ownerAddress, indexer = false, market, coinPrices, coinAmounts) => {
|
|
3703
|
+
const coinNames = Array.from(
|
|
3704
|
+
/* @__PURE__ */ new Set([...SUPPORT_POOLS, ...SUPPORT_COLLATERALS])
|
|
3705
|
+
);
|
|
3714
3706
|
const collateralAssetCoinNames = [
|
|
3715
3707
|
...SUPPORT_COLLATERALS
|
|
3716
3708
|
];
|
|
3717
3709
|
market = market ?? await query.queryMarket({ indexer });
|
|
3718
3710
|
coinPrices = coinPrices ?? await query.getAllCoinPrices({ marketPools: market.pools });
|
|
3719
|
-
coinAmounts = coinAmounts || await query.getCoinAmounts(
|
|
3711
|
+
coinAmounts = coinAmounts || await query.getCoinAmounts(coinNames, ownerAddress);
|
|
3720
3712
|
const [obligationQuery, borrowIncentivePools, borrowIncentiveAccounts] = await Promise.all([
|
|
3721
3713
|
query.queryObligation(obligationId),
|
|
3722
3714
|
query.getBorrowIncentivePools(void 0, {
|