@scallop-io/sui-scallop-sdk 0.46.38 → 0.46.39
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/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/queries/coreQuery.ts +15 -15
- package/src/queries/vescaQuery.ts +7 -9
package/dist/index.js
CHANGED
|
@@ -2107,7 +2107,7 @@ var getMarketPools = async (query, poolCoinNames, indexer = false) => {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
return marketPools;
|
|
2109
2109
|
}
|
|
2110
|
-
Promise.allSettled(
|
|
2110
|
+
await Promise.allSettled(
|
|
2111
2111
|
poolCoinNames.map(async (poolCoinName) => {
|
|
2112
2112
|
const marketPool = await getMarketPool(
|
|
2113
2113
|
query,
|
|
@@ -2124,11 +2124,6 @@ var getMarketPools = async (query, poolCoinNames, indexer = false) => {
|
|
|
2124
2124
|
return marketPools;
|
|
2125
2125
|
};
|
|
2126
2126
|
var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, coinPrice) => {
|
|
2127
|
-
const marketId = query.address.get("core.market");
|
|
2128
|
-
marketObject = marketObject || (await query.cache.queryGetObject(marketId, {
|
|
2129
|
-
showContent: true
|
|
2130
|
-
})).data;
|
|
2131
|
-
coinPrice = coinPrice || (await query.utils.getCoinPrices([poolCoinName]))?.[poolCoinName];
|
|
2132
2127
|
let marketPool;
|
|
2133
2128
|
let balanceSheet;
|
|
2134
2129
|
let borrowIndex;
|
|
@@ -2142,6 +2137,11 @@ var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, c
|
|
|
2142
2137
|
);
|
|
2143
2138
|
return marketPoolIndexer;
|
|
2144
2139
|
}
|
|
2140
|
+
const marketId = query.address.get("core.market");
|
|
2141
|
+
marketObject = marketObject || (await query.cache.queryGetObject(marketId, {
|
|
2142
|
+
showContent: true
|
|
2143
|
+
})).data;
|
|
2144
|
+
coinPrice = coinPrice || (await query.utils.getCoinPrices([poolCoinName]))?.[poolCoinName];
|
|
2145
2145
|
if (marketObject) {
|
|
2146
2146
|
if (marketObject.content && "fields" in marketObject.content) {
|
|
2147
2147
|
const fields = marketObject.content.fields;
|
|
@@ -2468,7 +2468,7 @@ var getMarketCoinAmounts = async (query, marketCoinNames, ownerAddress) => {
|
|
|
2468
2468
|
);
|
|
2469
2469
|
const owner = ownerAddress || query.suiKit.currentAddress();
|
|
2470
2470
|
const marketCoins2 = {};
|
|
2471
|
-
Promise.allSettled(
|
|
2471
|
+
await Promise.allSettled(
|
|
2472
2472
|
marketCoinNames.map(async (marketCoinName) => {
|
|
2473
2473
|
const marketCoin = await getMarketCoinAmount(
|
|
2474
2474
|
query,
|
|
@@ -3617,7 +3617,7 @@ var getVescaKeys = async (query, ownerAddress) => {
|
|
|
3617
3617
|
let hasNextPage = false;
|
|
3618
3618
|
let nextCursor = null;
|
|
3619
3619
|
do {
|
|
3620
|
-
const paginatedKeyObjectsResponse = await query.
|
|
3620
|
+
const paginatedKeyObjectsResponse = await query.cache.queryGetOwnedObjects({
|
|
3621
3621
|
owner,
|
|
3622
3622
|
filter: {
|
|
3623
3623
|
StructType: veScaKeyType
|