@liquidium/client 0.5.0 → 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.cjs CHANGED
@@ -5009,8 +5009,8 @@ var DECIMAL_BASE = 10;
5009
5009
  var PAIR_SEPARATOR = "_";
5010
5010
  var USDT_SYMBOL = "USDT";
5011
5011
  function mapDecodedPoolToPool(pool, rate) {
5012
- const totalSupply = pool.total_supply_at_last_sync;
5013
- const totalDebt = pool.total_debt_at_last_sync;
5012
+ const totalSupply = pool.total_supply_at_last_sync * pool.lending_index / RATE_SCALE;
5013
+ const totalDebt = pool.total_debt_at_last_sync * pool.borrow_index / RATE_SCALE;
5014
5014
  const availableLiquidity = totalSupply > totalDebt ? totalSupply - totalDebt : 0n;
5015
5015
  return {
5016
5016
  id: pool.principal.toString(),