@liquidium/client 0.5.0-rc.1 → 0.5.1

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.d.cts CHANGED
@@ -1107,9 +1107,9 @@ interface Pool {
1107
1107
  decimals: bigint;
1108
1108
  /** Whether new pool activity is currently frozen. */
1109
1109
  frozen: boolean;
1110
- /** Total supplied amount in base units. */
1110
+ /** Current supplied amount in base units after applying the lending index. */
1111
1111
  totalSupply: bigint;
1112
- /** Total borrowed amount in base units. */
1112
+ /** Current borrowed amount in base units after applying the borrow index. */
1113
1113
  totalDebt: bigint;
1114
1114
  /** Currently available liquidity in base units. */
1115
1115
  availableLiquidity: bigint;
package/dist/index.d.ts CHANGED
@@ -1107,9 +1107,9 @@ interface Pool {
1107
1107
  decimals: bigint;
1108
1108
  /** Whether new pool activity is currently frozen. */
1109
1109
  frozen: boolean;
1110
- /** Total supplied amount in base units. */
1110
+ /** Current supplied amount in base units after applying the lending index. */
1111
1111
  totalSupply: bigint;
1112
- /** Total borrowed amount in base units. */
1112
+ /** Current borrowed amount in base units after applying the borrow index. */
1113
1113
  totalDebt: bigint;
1114
1114
  /** Currently available liquidity in base units. */
1115
1115
  availableLiquidity: bigint;
package/dist/index.js CHANGED
@@ -5007,8 +5007,8 @@ var DECIMAL_BASE = 10;
5007
5007
  var PAIR_SEPARATOR = "_";
5008
5008
  var USDT_SYMBOL = "USDT";
5009
5009
  function mapDecodedPoolToPool(pool, rate) {
5010
- const totalSupply = pool.total_supply_at_last_sync;
5011
- const totalDebt = pool.total_debt_at_last_sync;
5010
+ const totalSupply = pool.total_supply_at_last_sync * pool.lending_index / RATE_SCALE;
5011
+ const totalDebt = pool.total_debt_at_last_sync * pool.borrow_index / RATE_SCALE;
5012
5012
  const availableLiquidity = totalSupply > totalDebt ? totalSupply - totalDebt : 0n;
5013
5013
  return {
5014
5014
  id: pool.principal.toString(),