@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.mjs
CHANGED
|
@@ -2034,7 +2034,7 @@ var getMarketPools = async (query, poolCoinNames, indexer = false) => {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
return marketPools;
|
|
2036
2036
|
}
|
|
2037
|
-
Promise.allSettled(
|
|
2037
|
+
await Promise.allSettled(
|
|
2038
2038
|
poolCoinNames.map(async (poolCoinName) => {
|
|
2039
2039
|
const marketPool = await getMarketPool(
|
|
2040
2040
|
query,
|
|
@@ -2051,11 +2051,6 @@ var getMarketPools = async (query, poolCoinNames, indexer = false) => {
|
|
|
2051
2051
|
return marketPools;
|
|
2052
2052
|
};
|
|
2053
2053
|
var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, coinPrice) => {
|
|
2054
|
-
const marketId = query.address.get("core.market");
|
|
2055
|
-
marketObject = marketObject || (await query.cache.queryGetObject(marketId, {
|
|
2056
|
-
showContent: true
|
|
2057
|
-
})).data;
|
|
2058
|
-
coinPrice = coinPrice || (await query.utils.getCoinPrices([poolCoinName]))?.[poolCoinName];
|
|
2059
2054
|
let marketPool;
|
|
2060
2055
|
let balanceSheet;
|
|
2061
2056
|
let borrowIndex;
|
|
@@ -2069,6 +2064,11 @@ var getMarketPool = async (query, poolCoinName, indexer = false, marketObject, c
|
|
|
2069
2064
|
);
|
|
2070
2065
|
return marketPoolIndexer;
|
|
2071
2066
|
}
|
|
2067
|
+
const marketId = query.address.get("core.market");
|
|
2068
|
+
marketObject = marketObject || (await query.cache.queryGetObject(marketId, {
|
|
2069
|
+
showContent: true
|
|
2070
|
+
})).data;
|
|
2071
|
+
coinPrice = coinPrice || (await query.utils.getCoinPrices([poolCoinName]))?.[poolCoinName];
|
|
2072
2072
|
if (marketObject) {
|
|
2073
2073
|
if (marketObject.content && "fields" in marketObject.content) {
|
|
2074
2074
|
const fields = marketObject.content.fields;
|
|
@@ -2395,7 +2395,7 @@ var getMarketCoinAmounts = async (query, marketCoinNames, ownerAddress) => {
|
|
|
2395
2395
|
);
|
|
2396
2396
|
const owner = ownerAddress || query.suiKit.currentAddress();
|
|
2397
2397
|
const marketCoins2 = {};
|
|
2398
|
-
Promise.allSettled(
|
|
2398
|
+
await Promise.allSettled(
|
|
2399
2399
|
marketCoinNames.map(async (marketCoinName) => {
|
|
2400
2400
|
const marketCoin = await getMarketCoinAmount(
|
|
2401
2401
|
query,
|
|
@@ -3544,7 +3544,7 @@ var getVescaKeys = async (query, ownerAddress) => {
|
|
|
3544
3544
|
let hasNextPage = false;
|
|
3545
3545
|
let nextCursor = null;
|
|
3546
3546
|
do {
|
|
3547
|
-
const paginatedKeyObjectsResponse = await query.
|
|
3547
|
+
const paginatedKeyObjectsResponse = await query.cache.queryGetOwnedObjects({
|
|
3548
3548
|
owner,
|
|
3549
3549
|
filter: {
|
|
3550
3550
|
StructType: veScaKeyType
|