@jup-ag/lend 0.0.37 → 0.0.38

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.
@@ -3,7 +3,7 @@ import BN from 'bn.js';
3
3
  import { Program } from '@coral-xyz/anchor';
4
4
  import { g as getTick, a as getTickIdLiquidation, c as getVaultConfig, d as getBranch, e as getTickHasDebt, f as getVaultState, v as vaults, h as getVaultMetadata, i as getPosition, j as getLiquidity, k as getClaimAccount, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getPositionTokenAccount, q as getPositionMint, r as getVaultAdmin } from '../shared/lend.CL8vvV0X.mjs';
5
5
  import { h as getReserve, e as liquidity } from '../shared/lend.BpBbTaiH.mjs';
6
- import { getMint, getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
6
+ import { getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
7
7
 
8
8
  const address = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
9
9
  const metadata = {
@@ -1237,10 +1237,8 @@ async function getOperateContext({
1237
1237
  program.account.vaultConfig.fetch(getVaultConfig(vaultId)),
1238
1238
  program.account.vaultMetadata.fetch(getVaultMetadata(vaultId))
1239
1239
  ]);
1240
- const [{ decimals: vaultSupplyDecimals }, { decimals: vaultBorrowDecimals }] = await Promise.all([
1241
- getMint(connection, vaultConfig.supplyToken),
1242
- getMint(connection, vaultConfig.borrowToken)
1243
- ]);
1240
+ const vaultSupplyDecimals = vaultMetadata.supplyMintDecimals;
1241
+ const vaultBorrowDecimals = vaultMetadata.borrowMintDecimals;
1244
1242
  if (newCol.gt(MIN_I128)) {
1245
1243
  const decimalsDelta = vaultSupplyDecimals < 9 ? 9 - vaultSupplyDecimals : 0;
1246
1244
  newCol = newCol.mul(new BN(10).pow(new BN(decimalsDelta)));
package/dist/index.mjs CHANGED
@@ -5,6 +5,6 @@ import '@solana/web3.js';
5
5
  import '@solana/spl-token';
6
6
  import 'bn.js';
7
7
 
8
- const version = "0.0.37";
8
+ const version = "0.0.38";
9
9
 
10
10
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jup-ag/lend",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",