@scallop-io/sui-scallop-sdk 0.44.9 → 0.44.11

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.
@@ -100,5 +100,8 @@ export type TotalValueLocked = {
100
100
  supplyValue: number;
101
101
  borrowValue: number;
102
102
  totalValue: number;
103
+ supplyValueChangeRatio?: number;
104
+ borrowValueChangeRatio?: number;
105
+ totalValueChangeRatio?: number;
103
106
  };
104
107
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "0.44.9",
3
+ "version": "0.44.11",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -44,7 +44,7 @@
44
44
  "@noble/hashes": "^1.3.2",
45
45
  "@pythnetwork/price-service-client": "^1.8.2",
46
46
  "@pythnetwork/pyth-sui-js": "^1.2.4",
47
- "@scallop-io/sui-kit": "^0.44.0",
47
+ "@scallop-io/sui-kit": "^0.44.2",
48
48
  "@scure/bip39": "^1.2.1",
49
49
  "axios": "^1.6.0",
50
50
  "bignumber.js": "^9.1.2",
@@ -704,6 +704,8 @@ export const getObligations = async (
704
704
  ) {
705
705
  hasNextPage = true;
706
706
  nextCursor = paginatedKeyObjectsResponse.nextCursor;
707
+ } else {
708
+ hasNextPage = false;
707
709
  }
708
710
  } while (hasNextPage);
709
711
 
@@ -820,6 +822,8 @@ export const getCoinAmounts = async (
820
822
  ) {
821
823
  hasNextPage = true;
822
824
  nextCursor = paginatedCoinObjectsResponse.nextCursor;
825
+ } else {
826
+ hasNextPage = false;
823
827
  }
824
828
  } while (hasNextPage);
825
829
 
@@ -884,6 +888,8 @@ export const getCoinAmount = async (
884
888
  ) {
885
889
  hasNextPage = true;
886
890
  nextCursor = paginatedCoinObjectsResponse.nextCursor;
891
+ } else {
892
+ hasNextPage = false;
887
893
  }
888
894
  } while (hasNextPage);
889
895
 
@@ -952,6 +958,8 @@ export const getMarketCoinAmounts = async (
952
958
  ) {
953
959
  hasNextPage = true;
954
960
  nextCursor = paginatedMarketCoinObjectsResponse.nextCursor;
961
+ } else {
962
+ hasNextPage = false;
955
963
  }
956
964
  } while (hasNextPage);
957
965
 
@@ -1018,6 +1026,8 @@ export const getMarketCoinAmount = async (
1018
1026
  ) {
1019
1027
  hasNextPage = true;
1020
1028
  nextCursor = paginatedMarketCoinObjectsResponse.nextCursor;
1029
+ } else {
1030
+ hasNextPage = false;
1021
1031
  }
1022
1032
  } while (hasNextPage);
1023
1033
 
@@ -673,12 +673,16 @@ export const getTotalValueLocked = async (
673
673
  let borrowValue = BigNumber(0);
674
674
 
675
675
  if (indexer) {
676
- const tvl = await query.indexer.getTotalValueLocked();
677
- return {
678
- supplyValue: tvl.supplyValue,
679
- borrowValue: tvl.borrowValue,
680
- totalValue: tvl.totalValue,
676
+ const tvlIndexer = await query.indexer.getTotalValueLocked();
677
+ const tvl: TotalValueLocked = {
678
+ supplyValue: tvlIndexer.supplyValue,
679
+ supplyValueChangeRatio: tvlIndexer.supplyValueChangeRatio,
680
+ borrowValue: tvlIndexer.borrowValue,
681
+ borrowValueChangeRatio: tvlIndexer.borrowValueChangeRatio,
682
+ totalValue: tvlIndexer.totalValue,
683
+ totalValueChangeRatio: tvlIndexer.totalValueChangeRatio,
681
684
  };
685
+ return tvl;
682
686
  }
683
687
 
684
688
  for (const pool of Object.values(market.pools)) {
@@ -283,6 +283,8 @@ export const getStakeAccounts = async (
283
283
  ) {
284
284
  hasNextPage = true;
285
285
  nextCursor = paginatedStakeObjectsResponse.nextCursor;
286
+ } else {
287
+ hasNextPage = false;
286
288
  }
287
289
  } while (hasNextPage);
288
290
 
@@ -124,4 +124,7 @@ export type TotalValueLocked = {
124
124
  supplyValue: number;
125
125
  borrowValue: number;
126
126
  totalValue: number;
127
+ supplyValueChangeRatio?: number;
128
+ borrowValueChangeRatio?: number;
129
+ totalValueChangeRatio?: number;
127
130
  };