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

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.10",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -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)) {
@@ -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
  };